/* ============================================================================
   ui.css 로 넘어온 공용 컴포넌트 (옛 additional.css)
   ----------------------------------------------------------------------------
   additional.css 가 ui.css·book.css 보다 먼저 로드됐으므로,
   그때의 우선순위를 지키려 파일 앞쪽에 둔다.
   ============================================================================ */

/* ── 버튼 목록 (btn-list · Btn*) ───────────────────────────────────────────── */
/* ── 버튼 목록 (btn-list · Btn*) ────────────────────────────────────
   문법: 주 동작 = 골드 채움 + 흰 글자, 보조 = 흰 바탕 + 테두리.
   PNG 화살표·다운로드 아이콘은 색 새긴 SVG data URI 로 교체했다. */

.btn-list {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1rem;
}
.btn-list a {
    position:relative;
}
.btn-list a span {
    font-size:inherit;
    max-width:80%;
    display:block;
    margin:0 auto;
}
.btn-list a img {
    position:absolute;
    right:10%;
    top:50%;
    transform:translateY(-50%);
    height:1.25rem;
    box-sizing:border-box;
    filter:grayscale(1) invert(.7);
}
/* .BtnGoList · .BtnDownload 는 .btn-cta / .btn-cta-ghost 한 벌로 옮겼다 —
   같은 문구가 네 가지 얼굴로 서 있던 것을 아래 «바닥 CTA» 하나로 모았다 */

.btn-list a,.btn-list div {
    padding:1rem 1.5rem;
    box-sizing:border-box;
    text-align:center;
    border-radius:var(--r-md);
    font-size:1.1rem;
    font-weight:500;
}
.btn-list a:focus-visible {
    outline:2px solid var(--gold);
    outline-offset:0.125rem;
}

@media (max-width:767px) {
    .btn-list {
        margin-top:3rem;
    }
    .btn-list a {
        max-width:100%;
    }
}

/* ── 도서 카드 (book card) ───────────────────────────────────────────────
   표지 + 언어번호 + 시리즈 + 제목 + 라벨. 마크업은 _components/book/bookCard.php
   하나가 그리는데, CSS 는 네 벌로 갈라져 있었다 —
     · .book-recommend-area .book-list …          (book.css, 옛 값)
     · .section-recommend …book-recommend-area …  (main.css, 메인만)
     · .book-view / .tabernacle .book-recommend-area … (book.css, 또 한 벌)
     · #sub_contents.book …ul.book-grid …         (book.css, 목록 격자)
   같은 뜻인데 번호가 10/600·10/700·11/700, 제목이 12/600·12/700·12.5/700·13/700,
   글자색이 먹과 연갈로 갈리고 줄수도 2와 3이 섞였다.
   main.css 는 index.php 가 book.css 를 받지 않아서 통째로 복사돼 있던 것이다.
   그래서 두 곳 다 받는 ui.css 로 옮기고 나머지는 지웠다.

   여기서 정하지 않는 것: 표지 폭과 열 수. 그건 «어느 영역이냐» 의 몫이다. */
.book-recommend-area .book-list .item,
.book-area > ul.book-list:not(.book-grid) > li,
.book-area ul.book-grid:not(.feature-grid) > li {
    box-sizing:border-box;
}
.book-recommend-area .book-list .item > a,
.book-area > ul.book-list:not(.book-grid) > li > a,
.book-area ul.book-grid:not(.feature-grid) > li > a {
    display:flex;
    flex-direction:column;
    width:100%;
    box-sizing:border-box;
    color:inherit;
    text-decoration:none;
}
/* 표지 — 책등(:before)과 안쪽 테두리(:after)까지 한 벌 */
.book-recommend-area .book-list .img-area,
.book-area > ul.book-list:not(.book-grid) > li .img-area,
.book-area ul.book-grid:not(.feature-grid) > li .img-area {
    position:relative;
    width:100%;
    max-width:none;
    margin:0;
    overflow:hidden;
    border-radius:4px 8px 8px 4px;
    background:var(--panel);
    box-shadow:0 2px 4px rgba(31,26,18,.10), 0 15px 26px -17px rgba(31,26,18,.60);
    transition:transform .24s ease, box-shadow .24s ease;
}
.book-recommend-area .book-list .img-area:before,
.book-area > ul.book-list:not(.book-grid) > li .img-area:before,
.book-area ul.book-grid:not(.feature-grid) > li .img-area:before {
    position:absolute;
    z-index:var(--z-inlay);
    top:0;
    bottom:0;
    left:0;
    width:7px;
    background:linear-gradient(90deg, rgba(24,18,10,.18), rgba(255,255,255,.09), transparent);
    content:'';
    pointer-events:none;
}
.book-recommend-area .book-list .img-area:after,
.book-area > ul.book-list:not(.book-grid) > li .img-area:after,
.book-area ul.book-grid:not(.feature-grid) > li .img-area:after {
    position:absolute;
    z-index:var(--z-inlay);
    inset:0;
    border:1px solid rgba(34,27,16,.08);
    border-radius:inherit;
    box-shadow:inset -1px 0 rgba(255,255,255,.2);
    content:'';
    pointer-events:none;
}
.book-recommend-area .book-list .img-area img,
.book-area > ul.book-list:not(.book-grid) > li .img-area img,
.book-area ul.book-grid:not(.feature-grid) > li .img-area img {
    display:block;
    width:100%;
    height:auto;
    aspect-ratio:260 / 381;
    object-fit:cover;
    transition:transform .24s ease;
}
.book-recommend-area .book-list .text-area,
.book-area > ul.book-list:not(.book-grid) > li .text-area,
.book-area ul.book-grid:not(.feature-grid) > li .text-area {
    display:block;
    flex:1 1 auto;
    min-width:0;
    padding:12px 1px 0;
    text-align:start;
}
/* 언어 번호 — 앞에 짧은 선 하나 («— English 11») */
.book-recommend-area .book-list .small-title,
.book-area > ul.book-list:not(.book-grid) > li .small-title,
.book-area ul.book-grid:not(.feature-grid) > li .small-title {
    display:flex;
    align-items:center;
    gap:6px;
    height:auto;
    margin:0 0 4px;
    color:var(--muted);
    font-size:var(--fs-2xs);
    line-height:1.4;
    font-weight:600;
    letter-spacing:.025em;
}
.book-recommend-area .book-list .small-title:before,
.book-area > ul.book-list:not(.book-grid) > li .small-title:before,
.book-area ul.book-grid:not(.feature-grid) > li .small-title:before {
    flex:0 0 12px;
    width:12px;
    height:1px;
    background:#c9c5bd;
    content:'';
}
/* 시리즈 + 권수가 카드의 머리글 */
.book-recommend-area .book-list .book-series,
.book-area > ul.book-list:not(.book-grid) > li .book-series,
.book-area ul.book-grid:not(.feature-grid) > li .book-series {
    display:-webkit-box;
    overflow:hidden;
    margin:0 0 3px;
    color:var(--ink);
    font-size:0.84375rem;
    line-height:1.35;
    font-weight:700;
    letter-spacing:-.015em;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}
.book-recommend-area .book-list .book-name,
.book-area > ul.book-list:not(.book-grid) > li .book-name,
.book-area ul.book-grid:not(.feature-grid) > li .book-name {
    display:-webkit-box;
    overflow:hidden;
    min-height:0;
    margin:0;
    color:var(--copy-soft);
    font-size:var(--fs-xs);
    line-height:1.5;
    font-weight:600;
    letter-spacing:-.012em;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    transition:color var(--t-fast);
}
/* 시리즈가 없는 단권은 제목이 머리글 노릇을 이어받는다 */
.book-recommend-area .book-list .small-title:first-child + .book-name,
.book-recommend-area .book-list .book-name:first-child,
.book-area > ul.book-list:not(.book-grid) > li .small-title:first-child + .book-name,
.book-area > ul.book-list:not(.book-grid) > li .book-name:first-child,
.book-area ul.book-grid:not(.feature-grid) > li .small-title:first-child + .book-name,
.book-area ul.book-grid:not(.feature-grid) > li .book-name:first-child {
    color:var(--ink);
    font-size:0.78125rem;
    font-weight:700;
}
.book-recommend-area .book-list .book-labels,
.book-area > ul.book-list:not(.book-grid) > li .book-labels,
.book-area ul.book-grid:not(.feature-grid) > li .book-labels {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:4px;
    min-height:22px;
    margin-top:7px;
}
/* 라벨 알약 — 색은 관리자가 정한 라벨 색을 인라인으로 받는다 */
.book-recommend-area .book-list .book-labels .badge-chip,
.book-area > ul.book-list:not(.book-grid) > li .book-labels .badge-chip,
.book-area ul.book-grid:not(.feature-grid) > li .book-labels .badge-chip {
    display:inline-flex;
    align-items:center;
    box-sizing:border-box;
    min-height:22px;
    padding:3px 9px;
    border:1px solid rgba(0,0,0,.06);
    border-radius:var(--r-pill);
    font-size:var(--fs-2xs);
    line-height:var(--lh-tight);
    font-weight:700;
    text-decoration:none;
    box-shadow:none;
}
.book-recommend-area .book-list .book-author,
.book-area > ul.book-list:not(.book-grid) > li .book-author {
    margin-top:5px;
    color:var(--muted);
    font-size:var(--fs-2xs);
    line-height:1.4;
    font-weight:500;
}
@media (hover:hover) {
    .book-recommend-area .book-list .item > a:hover .img-area,
    .book-area > ul.book-list:not(.book-grid) > li > a:hover .img-area,
    .book-area ul.book-grid:not(.feature-grid) > li > a:hover .img-area {
        transform:translateY(-3px);
        box-shadow:0 4px 8px rgba(31,26,18,.12), 0 20px 30px -18px rgba(31,26,18,.66);
    }
    .book-recommend-area .book-list .item > a:hover .img-area img,
    .book-area > ul.book-list:not(.book-grid) > li > a:hover .img-area img,
    .book-area ul.book-grid:not(.feature-grid) > li > a:hover .img-area img {
        transform:scale(1.02);
    }
    .book-recommend-area .book-list .item > a:hover .book-series,
    .book-area > ul.book-list:not(.book-grid) > li > a:hover .book-series,
    .book-area ul.book-grid:not(.feature-grid) > li > a:hover .book-series,
    .book-recommend-area .book-list .item > a:hover .book-name,
    .book-area > ul.book-list:not(.book-grid) > li > a:hover .book-name,
    .book-area ul.book-grid:not(.feature-grid) > li > a:hover .book-name {
        color:var(--gold-deep);
    }
}

@media (max-width:767px) {
    .book-recommend-area .book-list .text-area,
    .book-area > ul.book-list:not(.book-grid) > li .text-area,
    .book-area ul.book-grid:not(.feature-grid) > li .text-area {
        padding-top:9px;
    }
}

/* ── 바닥 CTA (cta-bar · btn-cta) ───────────────────────────────────────
   화면 맨 아래에서 «무료 도서 받으러 가기» 를 권하는 한 벌.
   예전에는 같은 문구(book_text4_1)가 네 가지 얼굴로 서 있었다 —
     · .btn-list a.BtnDownload      사각 600px 고정, 배경 이미지 «›»   (FAQ·설교)
     · .btn-tabernacle-books        알약 내용너비, 인라인 SVG «→»      (성막·복음·성구)
     · .btn-author-books            알약이지만 여백·글씨가 또 달랐다   (저자 소개)
   모양도 너비도 화살표도 그림자도 제각각이었다. 이제 이 하나가 그린다.
   화살표는 마크업이 아니라 여기서 그린다 — 페이지마다 SVG 를 손으로
   붙이던 것을 없애고, 글자색(currentColor)을 따라가게 한다. */
.cta-bar {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:var(--sp-3);
    margin-top:var(--sp-8);
}
.btn-cta,
.btn-cta-ghost {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:var(--sp-2);
    box-sizing:border-box;
    min-height:3rem;
    max-width:100%;
    padding:0.75rem 2rem;
    border:1px solid transparent;
    border-radius:var(--r-pill);
    font-size:var(--fs-md);
    font-weight:700;
    line-height:1.35;
    text-align:center;
    text-decoration:none;
    transition:background-color var(--t-fast), border-color var(--t-fast),
        color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
/* 주 동작 — 영역 색 면 */
.btn-cta {
    background:var(--zone);
    color:var(--paper);
    box-shadow:var(--zone-shadow);
}
.btn-cta:hover {
    background:var(--zone-deep);
    transform:translateY(-2px);
}
/* 보조 — 흰 바탕 + 테두리 (되돌아가기 따위) */
.btn-cta-ghost {
    border-color:var(--line);
    background:var(--paper);
    color:var(--ink);
}
.btn-cta-ghost:hover {
    border-color:var(--zone-line);
    color:var(--zone-deep);
    box-shadow:var(--sh-soft);
    transform:translateY(-2px);
}
.btn-cta:focus-visible,
.btn-cta-ghost:focus-visible {
    outline:2px solid var(--zone);
    outline-offset:2px;
}
/* 화살표 — 주는 앞으로, 보조는 뒤로 */
.btn-cta:after,
.btn-cta-ghost:before {
    flex:0 0 1.125rem;
    width:1.125rem;
    height:1.125rem;
    background:currentColor;
    content:'';
}
.btn-cta:after {
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/1.125rem no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/1.125rem no-repeat;
}
.btn-cta-ghost:before {
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center/1.125rem no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center/1.125rem no-repeat;
}
/* 오른쪽에서 읽는 말에서는 화살표도 돌아선다 */
.align-right .btn-cta:after,
.align-right .btn-cta-ghost:before {
    transform:scaleX(-1);
}
/* 굵게 강조한 «FREE» 는 한 급 밝은 금색 (주 동작 안에서만) */
.btn-cta b {
    color:var(--gold-soft);
}

@media (max-width:767px) {
    .cta-bar {
        gap:var(--sp-2);
        margin-top:var(--sp-6);
    }
    .btn-cta,
    .btn-cta-ghost {
        width:100%;
        padding:0.75rem 1.25rem;
        font-size:var(--fs-base);
    }
}

/* ── 공유 버튼 (share_area) ────────────────────────────────────────────────── */
/* ── 공유 버튼 (share_area) ─────────────────────────────────────────── */

.share-area {
    position:relative;
    margin-bottom:1rem;
}
.share-area .BtnShare {
    width:3rem;
    height:3rem;
    display:inline-block;
    box-sizing:border-box;
    padding:.75rem;
    border-radius:50%;
    transition:background-color var(--t-fast);
}
.share-area .BtnShare:hover {
    background-color:var(--gold-wash);
}
.share-area .BtnShare img {
    max-width:100%;
}

@media (max-width:480px) {
    .share-area .BtnShare {
        width:2.5rem;
        height:2.5rem;
        padding:.5rem;
    }
}

/* ── 버튼 한 벌 ─────────────────────────────────────────────────────────────
   이름은 «무엇을 하는 단추인가»를 말한다. 색은 놓인 영역이 정한다.

   예전에는 색이 곧 이름이었다 — btn_brand(보라) · btn_blue(남보라) ·
   btn_amber(호박) · btn_accent(진홍) · btn_wh(흰). 다섯 이름이 실제로는
   «주 동작»과 «보조 동작» 둘뿐이었고, 같은 «목록으로»가 화면마다 다른 색으로
   섰다. 게다가 sub.css 의 구간 머리말은 «주 버튼은 골드»라고 적혀 있는데
   정작 .btn-primary 는 보라였다 — 말과 코드가 어긋난 채로 굳어 있었다.

   이제 역할이 이름이고, 축은 --zone 한 벌이 옮긴다. 기본은 브랜드 크롬의 골드,
   보라를 쓰는 영역은 그 영역에 .accent-zone 을 얹으면 단추도 탭도 따라온다.
   («단추 축»이 아니라 «영역 축»이라 탭·포커스 링도 같은 변수를 본다.)
   ───────────────────────────────────────────────────────────────────────── */
:root {
    --zone:        var(--gold);
    --zone-deep:   var(--gold-deep);
    --zone-soft:   var(--gold-soft);
    --zone-wash:   var(--gold-wash);
    --zone-line:   var(--gold-line);
    --zone-shadow: var(--sh-gold);
    --zone-focus:  var(--focus);
}
.accent-zone {
    --zone:        var(--accent);
    --zone-deep:   var(--accent-deep);
    --zone-soft:   var(--accent-soft);
    --zone-wash:   var(--accent-wash);
    --zone-line:   var(--accent-line);
    --zone-shadow: var(--sh-accent);
    --zone-focus:  var(--focus-accent);
}

.btn-primary,
.btn-secondary,
.btn-quiet,
.btn-outline,
.btn-danger {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:var(--sp-2);
    box-sizing:border-box;
    min-height:2.75rem;
    padding:0 var(--sp-5);
    border:1px solid transparent;
    border-radius:var(--r-md);
    font-size:var(--fs-md);
    font-weight:700;
    line-height:1.2;
    text-align:center;
    cursor:pointer;
    transition:background-color var(--t-fast), border-color var(--t-fast),
               color var(--t-fast), box-shadow var(--t-base);
}

/* 주 동작 — 한 화면에 하나가 원칙이다 */
.btn-primary {
    background:var(--zone);
    color:var(--paper);
}
.btn-primary:hover {
    background:var(--zone-deep);
    box-shadow:var(--zone-shadow);
}

/* 보조 동작 — 되돌아가기 · 목록 · 취소 */
.btn-secondary {
    background:var(--paper);
    border-color:var(--line-input);
    color:var(--ink);
}
.btn-secondary:hover {
    border-color:var(--zone);
    background:var(--zone-wash);
}

/* 조용한 동작 — 면도 테두리도 없이 글자만 */
.btn-quiet {
    background:transparent;
    color:var(--zone-deep);
}
.btn-quiet:hover {
    background:var(--zone-wash);
}

/* 되돌릴 수 없는 동작에만 */
.btn-danger {
    background:var(--bad);
    color:var(--paper);
}
.btn-danger:hover {
    background:var(--bad);
    box-shadow:var(--sh-soft);
    filter:brightness(.92);
}

/* 표 안이나 줄 사이에 끼는 작은 단추 */
.btn-sm {
    min-height:1.875rem;
    padding:0 var(--sp-3);
    font-size:var(--fs-base);
    border-radius:var(--r-sm);
}

/* 크게 — 화면의 걸음을 앞으로 미는 단추 (가입 흐름의 «다음» 같은 것) */
.btn-lg {
    min-height:3.125rem;
    padding:0 var(--sp-6);
    font-size:var(--fs-md);
}

/* 테를 두른 갈래 — 면을 채우지 않고 영역 색 테두리로만 선다.
   한 화면에 주 동작이 이미 있는데 두 번째 동작도 눈에 띄어야 할 때 쓴다 */
.btn-outline {
    background:var(--paper);
    border-color:var(--zone);
    color:var(--zone-deep);
}
.btn-outline:hover {
    background:var(--zone-soft);
}

/* 모양 수식어 — 알약형. 가입·로그인 흐름이 제 이름으로 네 벌 그리고 있던 것을
   여기 한 자리로 모았다 (계약서 §2.2 «알약형 단추» = 컴포넌트 요청) */
.btn-pill {border-radius:var(--r-pill);}

/* 자리 수식어 — 줄을 통째로 차지한다 (카드 안 제출 단추) */
.btn-block {width:100%;}

/* RTL — 앞은 왼쪽이다. 단추 속 인라인 글리프는 모두 방향을 가진 것들이라
   (→ 다음, ← 뒤로, ⇥ 로그아웃) 통째로 돌아선다. 방향 없는 글리프를 단추에
   넣을 일이 생기면 그때 이 규칙에서 빼야 한다 */
.align-right .btn-primary > svg,
.align-right .btn-secondary > svg,
.align-right .btn-quiet > svg,
.align-right .btn-outline > svg,
.align-right .btn-danger > svg {
    transform:scaleX(-1);
}

.btn-primary[disabled],
.btn-secondary[disabled],
.btn-quiet[disabled],
.btn-outline[disabled],
.btn-danger[disabled] {
    opacity:.5;
    cursor:not-allowed;
    box-shadow:none;
}

/* 단추 묶음 — 화면 아래 가운데로 모은다 */
.btn-box {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:var(--sp-3);
    margin:var(--sp-7) 0 0;
}


/* ── 입력 컨트롤 ────────────────────────────────────────────────────────────
   글을 받는 요소의 바탕을 한 벌로 둔다. 높이 2.75rem, 반경 --r-md,
   테두리 --line-input, 포커스는 영역 색 테두리 + 3px 링 (design-language.md §3).

   요소 이름(input·select·textarea)으로 건다. 화면마다 «이 화면의 입력» 을 다시
   그리던 규칙이 수십 벌이라, 클래스를 새로 만들면 그것들을 전부 고쳐야 한다.
   바탕만 여기서 깔고, 화면이 폭·자리만 얹으면 되게 한다.
   ───────────────────────────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    box-sizing:border-box;
    min-height:2.75rem;
    padding:0 var(--sp-4);
    border:1px solid var(--line-input);
    border-radius:var(--r-md);
    background:var(--paper);
    color:var(--ink);
    font-family:inherit;
    font-size:var(--fs-base);
    transition:border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea {
    padding:var(--sp-3) var(--sp-4);
    line-height:var(--lh-base);
    resize:vertical;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color:var(--zone);
    box-shadow:0 0 0 3px var(--zone-focus);
    outline:0;
}
input::placeholder,
textarea::placeholder {
    color:var(--faint);
}
input[disabled],
select[disabled],
textarea[disabled] {
    background:var(--panel);
    color:var(--muted);
    cursor:not-allowed;
}

/* ── 탭 한 벌 ───────────────────────────────────────────────────────────────
   밑줄형이 기준이다 (design-language.md §3). 활성 항목 아래에 골드 바가 선다.

   예전에는 탭이 다섯 벌이었다 — 도서 목록의 밑줄형(.book-mode-switch),
   FAQ 의 알약 4분할(.tab-type2), 약관의 세그먼트 상자(.terms-tabs),
   검색의 가로 스크롤 칩(.search-tab-chip), 그리고 그 바탕의 옛 알약형(.tab).
   같은 «갈래 고르기» 인데 화면마다 모양도 활성 색도 달랐다.

   마크업 꼴은 두 가지를 다 받는다 — «ul > li > a» 와 «nav > a».
   활성 표시는 .active(PHP 가 붙이는 옛 이름)와 .is-on 을 함께 본다.
   ───────────────────────────────────────────────────────────────────────── */
.tabs {
    display:flex;
    align-items:stretch;
    gap:var(--sp-1);
    margin:0 0 var(--sp-5);
    padding:0;
    border-bottom:1px solid var(--line);
    list-style:none;
}
.tabs > li {
    flex:1 1 0;
    min-width:0;
    list-style:none;
}
.tabs > li > a,
.tabs > a {
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:var(--sp-2);
    box-sizing:border-box;
    height:100%;
    min-height:3.25rem;
    padding:0 var(--sp-4);
    color:var(--muted);
    font-size:var(--fs-md);
    font-weight:700;
    line-height:1.3;
    text-align:center;
    transition:color var(--t-fast), background-color var(--t-fast);
}
.tabs > a {
    flex:1 1 0;
    min-width:0;
}
.tabs > li > a:hover,
.tabs > a:hover {
    color:var(--ink);
    background:var(--zone-wash);
}
/* 활성 — 영역 색 글자 + 아래 3px 바. 바는 아래 테두리 위에 겹쳐 얹는다 */
.tabs > li.active > a,
.tabs > li.is-on > a,
.tabs > a.active,
.tabs > a.is-on {
    color:var(--zone-deep);
    font-weight:800;
}
.tabs > li.active > a:after,
.tabs > li.is-on > a:after,
.tabs > a.active:after,
.tabs > a.is-on:after {
    position:absolute;
    right:0;
    bottom:-1px;
    left:0;
    height:3px;
    border-radius:var(--r-pill) var(--r-pill) 0 0;
    background:var(--zone);
    content:'';
}

/* 갈래가 많아 넘칠 때 — 가로로 민다 */
.tabs-scroll {
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
}
.tabs-scroll::-webkit-scrollbar {display:none;}
.tabs-scroll > li,
.tabs-scroll > a {
    flex:0 0 auto;
}

/* 갈래 옆의 건수 */
.tab-badge {
    display:inline-flex;
    align-items:center;
    min-width:1.5rem;
    padding:0 var(--sp-2);
    border-radius:var(--r-pill);
    background:var(--panel);
    color:var(--copy-soft);
    font-size:var(--fs-2xs);
    font-weight:700;
}
.tabs > li.active > a .tab-badge,
.tabs > a.active .tab-badge,
.tabs > li.is-on > a .tab-badge,
.tabs > a.is-on .tab-badge {
    background:var(--zone-soft);
    color:var(--zone-deep);
}

@media (max-width:767px) {
    .tabs > li > a,
    .tabs > a {
        min-height:2.75rem;
        padding:0 var(--sp-3);
        font-size:var(--fs-base);
    }
}

/* 찾기 단추 — 돋보기 하나.
   글자(«Search»)는 뺐다. 27개 언어에서 길이가 제각각이라 검색 바의 입력 칸을
   언어마다 다른 폭으로 갉아먹었고, 돋보기만으로 뜻이 통하는 자리다.
   대신 이름은 aria-label 로 남긴다 — 눈에서만 빼고 낭독기에서는 그대로다.

   아이콘은 마스크로 그려 currentColor 를 따라간다. 색을 두 곳(글자와 아이콘)에
   따로 적지 않아도 되고, 영역 축(--zone)이 바뀌면 아이콘도 함께 옮겨 간다. */
.btn-search {
    gap:0;
}
.btn-search:before {
    flex:0 0 auto;
    width:1.125rem;
    height:1.125rem;
    background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain;
    content:'';
}

/* ── 세그먼트 토글 (tabs-segment) ───────────────────────────────────────────
   카드 안에서 «같은 자리의 내용»을 바꾸는 토글. 화면을 옮기는 밑줄형 탭과 달리
   그 자리에 머무르며 보이는 것만 갈아 끼우므로, 눌린 조각이 면으로 서는 편이
   읽기 쉽다 (메인의 단권/합본 고르기가 이 꼴이다).

   예전에는 이 토글이 main.css 안에서 팔레트에 없는 먹색(--ink) 알약으로 서 있었다.
   같은 «단권 / 합본» 선택이 도서 목록에서는 골드 밑줄 탭이었으니, 한 사이트에서
   같은 물음이 두 얼굴을 하고 있었던 셈이다. 영역 축(--zone)으로 맞춘다.

   마크업은 «label > input[type=radio]» 꼴도 «a» 꼴도 받는다.
   ───────────────────────────────────────────────────────────────────────── */
.tabs-segment {
    display:inline-flex;
    align-items:center;
    gap:var(--sp-1);
    box-sizing:border-box;
    width:fit-content;
    max-width:100%;
    margin:0 0 var(--sp-5);
    padding:var(--sp-1);
    border:1px solid var(--line-soft);
    border-radius:var(--r-pill);
    background:var(--paper-warm);
    list-style:none;
}
.tabs-segment > li {
    flex:0 0 auto;
    list-style:none;
}
.tabs-segment > li > a,
.tabs-segment > a,
.tabs-segment label {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:2.25rem;
    padding:0 var(--sp-5);
    border-radius:var(--r-pill);
    color:var(--copy-soft);
    font-size:var(--fs-base);
    font-weight:600;
    white-space:nowrap;
    cursor:pointer;
    transition:color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-base);
}
.tabs-segment label input {
    display:none;
}
.tabs-segment > li > a:hover,
.tabs-segment > a:hover,
.tabs-segment label:not(:has(input:checked)):hover {
    color:var(--ink);
    background:var(--zone-wash);
}
/* 눌린 조각 — 영역 색 면 + 흰 글자 */
.tabs-segment > li.active > a,
.tabs-segment > li.is-on > a,
.tabs-segment > a.active,
.tabs-segment > a.is-on,
.tabs-segment label:has(input:checked) {
    background:var(--zone);
    color:var(--paper);
    font-weight:700;
    box-shadow:var(--zone-shadow);
}
/* 밑줄형의 활성 바는 이 꼴에 오지 않는다 */
.tabs-segment > li.active > a:after,
.tabs-segment > a.active:after {
    display:none;
}

/* ── 조각 안의 그림표 (.mode-icon) ─────────────────────────────────────────
   «한 언어 / 두 언어» 처럼 갈래가 서로 짝을 이룰 때, 글자만으로는 훑어보는
   눈에 잘 안 잡힌다. 테두리만으로 그린 책 모양 둘을 앞에 세운다.
   글자색을 따라가므로(currentColor) 눌린 조각에서는 흰색이 된다.
   도서 목록과 메인 추천이 이 한 벌을 같이 쓴다 — 예전에는 도서 목록의
   book.css 안에만 있어 메인에는 그림표가 없었다. */
.tabs-segment > li > a:has(.mode-icon),
.tabs-segment > a:has(.mode-icon),
.tabs-segment label:has(.mode-icon) {
    gap:var(--sp-2);
}
.mode-icon {
    flex:0 0 1.125rem;
    box-sizing:border-box;
    width:1.125rem;
    height:1.125rem;
    color:currentColor;
}
/* 한 언어 — 앞장 한 겹, 뒤에 그림자처럼 한 겹 */
.mode-icon-single {
    position:relative;
    border:1.5px solid currentColor;
    border-radius:2px;
}
.mode-icon-single:after {
    position:absolute;
    top:2px;
    right:-4px;
    bottom:-4px;
    width:100%;
    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;
    border-radius:0 0 2px 0;
    content:'';
}
/* 두 언어 — 펼친 책, 두 쪽이 서로 반대로 기운다 */
.mode-icon-dual {
    position:relative;
}
.mode-icon-dual:before,
.mode-icon-dual:after {
    position:absolute;
    top:2px;
    bottom:2px;
    box-sizing:border-box;
    width:9px;
    border:1.5px solid currentColor;
    content:'';
}
.mode-icon-dual:before {
    left:0;
    border-radius:2px 0 0 2px;
    transform:skewY(5deg);
}
.mode-icon-dual:after {
    right:0;
    border-radius:0 2px 2px 0;
    transform:skewY(-5deg);
}

@media (max-width:767px) {
    .tabs-segment {
        width:100%;
    }
    .tabs-segment > li,
    .tabs-segment > a,
    .tabs-segment label {
        flex:1 1 0;
    }
    /* 좁은 화면에서는 긴 갈래 이름(«Dual Language (Bilingual Book)» 따위)이
       제 칸을 넘어 잘렸다. 한 줄을 고집하지 말고 두 줄로 접는다.
       box-sizing 도 여기서 못 박는다 — width:100% 에 좌우 여백이 더해져
       조각이 칸을 넘고 눌린 면이 옆 조각을 덮었다. */
    .tabs-segment > li > a,
    .tabs-segment > a,
    .tabs-segment label {
        box-sizing:border-box;
        width:100%;
        padding:0 var(--sp-3);
        font-size:var(--fs-sm);
        line-height:1.25;
        text-align:center;
        white-space:normal;
    }
    .mode-icon {
        flex-basis:.9375rem;
        width:.9375rem;
        height:.9375rem;
    }
    /* 괄호 안 덧말은 접는다 — «Dual Language (Bilingual Book)» 이 좁은 화면에서
       두 줄로 접히며 조각 둘의 균형을 깨뜨렸다. 이름만으로도 갈래는 통한다. */
    .mode-note {
        display:none;
    }
}

/* ── 입력 묶음 (input-group) ────────────────────────────────────────────────
   «고르고 · 적고 · 누르는» 한 줄을 한 상자로 묶는다. 목록 위 검색 바가 대표다.

   테두리는 묶음이 하나만 두르고 안쪽 요소는 벗는다. 그래야 요소마다 테두리가
   겹쳐 두 줄로 보이는 일이 없고, 포커스 링도 묶음 전체에 한 번만 걸린다.
   ───────────────────────────────────────────────────────────────────────── */
.input-group {
    display:flex;
    align-items:stretch;
    box-sizing:border-box;
    border:1px solid var(--line-input);
    border-radius:var(--r-md);
    background:var(--paper);
    overflow:hidden;
}
.input-group:focus-within {
    border-color:var(--zone);
    box-shadow:0 0 0 3px var(--zone-focus);
}
.input-group > input,
.input-group > select,
.input-group > textarea {
    min-width:0;
    min-height:2.75rem;
    padding:0 var(--sp-4);
    border:0;
    background:transparent;
    color:var(--ink);
    font-size:var(--fs-base);
}
.input-group > input {
    flex:1 1 auto;
}
.input-group > input:focus,
.input-group > select:focus {
    outline:0;
    box-shadow:none;
}
/* 앞에 붙는 셀렉트는 가는 선으로만 나눈다 */
.input-group > select {
    flex:0 0 auto;
    padding-right:var(--sp-7);
    border-right:1px solid var(--line-soft);
    background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23918b80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right var(--sp-3) center / 0.875rem auto;
    font-weight:700;
    appearance:none;
}
.input-group > input,
.input-group > select {
    border-radius:0;
}
/* 끝에 붙는 단추 — 면을 채우지 않는다.
   묶음이 이미 테두리로 한 덩이임을 말하고 있어서, 그 안에서 단추까지 면을 깔면
   상자 안에 상자가 하나 더 생긴 것처럼 무거워진다. 아이콘과 색으로만 선다. */
.input-group > button,
.input-group > .btn-primary,
.input-group > .btn-secondary,
.input-group > .btn-quiet {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:var(--sp-2);
    flex:0 0 auto;
    min-height:2.75rem;
    padding:0 var(--sp-4);
    border:0;
    border-radius:0;
    background:transparent;
    color:var(--zone-deep);
    font-size:var(--fs-base);
    font-weight:700;
    cursor:pointer;
    transition:color var(--t-fast), background-color var(--t-fast);
}
.input-group > button:hover,
.input-group > .btn-primary:hover,
.input-group > .btn-secondary:hover,
.input-group > .btn-quiet:hover {
    background:var(--zone-wash);
    color:var(--zone);
    box-shadow:none;
}
.input-group > button svg {
    flex:0 0 auto;
}
/* 알약 꼴 — 목록 위에 떠 있는 검색 바에 쓴다 */
.input-group-pill {
    border-radius:var(--r-pill);
}
/* 찾기 단추가 아이콘 하나뿐일 때 — 정사각에 가까운 누를 자리.
   위의 «.input-group > .btn-primary» 와 특이도가 같으므로 반드시 그 뒤에 온다 */
.input-group > .btn-search {
    width:3rem;
    padding:0;
}

.input-group-pill > input:first-child,
.input-group-pill > select:first-child {
    padding-left:var(--sp-5);
}

/* 좁은 화면에서는 줄 전체를 쓴다.
   (예전에는 board.css 가 «.total-box .search-box{width:100%}» 로 화면마다
   따로 챙기던 일이다 — 컴포넌트가 제 반응형을 갖게 한다) */
@media (max-width:767px) {
    .input-group {
        width:100%;
    }
    .input-group > select {
        max-width:40%;
    }
}

/* ── 고르기 목록 (option-box) ───────────────────────────────────────────────
   라디오 한 줄을 카드로 세운 목록. 설문이 쓴다.

   예전에는 «.modal-custom form .option-box» 로 설문 모달 안에만 살았고,
   `input {display:none}` 으로 라디오를 아예 지웠다. 그래서 Tab 이 닿지 않아
   아홉 개 중 하나도 키보드로 고를 수 없었다. 지금은 자리만 지우고 초점은 남긴다 —
   초점이 오면 카드에 링이 서고, 고른 카드는 영역 색 면으로 바뀐다.
   ───────────────────────────────────────────────────────────────────────── */
.option-list {
    display:flex;
    flex-direction:column;
    gap:var(--sp-2);
    margin:0;
    padding:0;
    list-style:none;
}
.option-box {
    border:1px solid var(--line-input);
    border-radius:var(--r-lg);
    transition:border-color var(--t-fast), background-color var(--t-fast);
}
/* 라디오는 지우지 않는다 — 눈에서만 뺀다. 초점은 그대로 받는다.
   갈래를 못 박아 둔다 — 예전에 «.option-box input» 으로 두었더니 «기타» 뒤에 오는
   자유 입력 칸까지 함께 숨어 화면 밖으로 나갔다. */
.option-box input[type="radio"],
.option-box input[type="checkbox"] {
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    border:0;
    clip-path:inset(50%);
    overflow:hidden;
    white-space:nowrap;
}
/* 고르는 줄은 둘 중 하나다 — 라디오를 감싼 <label>, 또는 그리로 가는 <a>.
   언어 선택처럼 «고른 것이 곧 지금 화면» 인 자리는 링크가 맞고, 그때 고름은
   .is-on 이 말한다. 둘을 다른 컴포넌트로 나누면 같은 동그라미를 두 번 그리게 된다. */
.option-box > label,
.option-box > a {
    box-sizing:border-box;
    display:flex;
    align-items:center;
    gap:var(--sp-2);
    width:100%;
    height:100%;
    padding:.8rem 1rem;
    color:inherit;
    font-size:var(--fs-md);
    cursor:pointer;
}
/* 동그라미 표식 — 고르기 전에는 빈 테, 고르면 영역 색 안에 흰 체크 */
.option-box > label:before,
.option-box > a:before {
    flex:0 0 auto;
    display:inline-block;
    width:1rem;
    height:1rem;
    border:2px solid var(--line-input);
    border-radius:var(--r-pill);
    transition:border-color var(--t-fast), background-color var(--t-fast);
    content:'';
}
.option-box > label > span,
.option-box > a > span {
    flex:1;
}
.option-box:hover {
    border-color:var(--zone-line);
}
.option-box:has(input:checked),
.option-box.is-on {
    border-color:var(--zone-line);
    background:var(--zone-wash);
    color:var(--zone-deep);
    font-weight:600;
}
.option-box:has(input:checked) > label:before,
.option-box.is-on > a:before {
    border-color:var(--zone);
    background:var(--zone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / .75rem;
}
.option-box:has(input:focus-visible),
.option-box:has(a:focus-visible) {
    outline:2px solid var(--zone);
    outline-offset:2px;
}
/* «기타» 처럼 고른 뒤에 더 물어야 하는 줄 — 고르기 전에는 접어 둔다.
   가입 설문의 아홉째 갈래가 그렇다. */
.option-box > .option-extra {
    display:none;
    box-sizing:border-box;
    width:calc(100% - 2rem);
    margin:0 1rem .8rem;
}
.option-box:has(input:checked) > .option-extra {
    display:block;
}

/* 두 칸 — 갈래가 많고 문구가 짧으면 한 줄에 둘씩 놓는다 (가입 설문) */
.option-list.is-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:var(--sp-3);
    align-items:start;
}
@media (max-width:1024px) {
    .option-list.is-grid {
        grid-template-columns:1fr;
    }
}

/* 촘촘한 판 — 팝오버처럼 좁은 자리에서는 테를 걷고 줄만 남긴다 */
.option-list.is-plain {
    gap:var(--sp-1);
}
.option-list.is-plain > .option-box {
    border-color:transparent;
    background:none;
}
.option-list.is-plain > .option-box:hover {
    background:var(--zone-wash);
}
.option-list.is-plain > .option-box > label,
.option-list.is-plain > .option-box > a {
    padding:var(--sp-2) var(--sp-3);
    font-size:var(--fs-base);
}

@media (prefers-reduced-motion:reduce) {
    .option-box,
    .option-box > label:before,
    .option-box > a:before {
        transition:none;
    }
}


/* ── 아코디언 (accordion) ───────────────────────────────────────────────────
   제목줄이 카드로 선 목록. 성경 용어·설교·FAQ 가 쓴다.

   예전에는 바탕이 «배경 이미지 셰브런» 을 오른쪽에 그리고 손잡이 오른쪽에
   80px 을 비워 두는 방식이었다. 그래서 RTL 에서는 그 80px 을 왼쪽으로 옮기려고
   layout.css 가 !important 로 패딩을 다시 잡았고, 인라인 SVG 를 쓰는 새 화면들은
   background-image:none 지우개를 아홉 개씩 붙여 그 셰브런을 지워야 했다.

   이제 셰브런은 마크업의 인라인 SVG 다. 손잡이는 flex 한 줄이고 아이콘은 맨 끝
   칸이라, 방향이 바뀌어도 논리 순서가 알아서 따라간다 — RTL 대항 규칙이 필요 없다.

   ── 줄은 «서브 DOM 이 있느냐» 로 갈린다 ──────────────────────────────────

     여는 줄  <li> 안에 .accordion-body 가 있다. 손잡이를 누르면 열린다.
              셰브런은 아래(∨)를 보고, 열리면 뒤집힌다.
     가는 줄  본문이 없고 <a> 가 손잡이를 감싼다. 누르면 다른 화면으로 간다.
              셰브런은 앞(›)을 보고 호버에 그쪽으로 밀린다. 열림 표시는 없다.
     선 줄    본문도 링크도 없다. 누를 것이 아니다 — 셰브런을 지우고 글자를 죽인다.

   이 구분이 없으면 아래를 보는 셰브런이 «열린다» 고 약속해 놓고 화면이 바뀌거나
   (FAQ 가 그랬다), 눌러도 빈 칸만 열린다 (설교 주제에 설교가 0건인 줄이 그렇다).
   기본값은 «여는 줄» 이다 — 갈래를 :has() 로 읽으므로, 그것을 모르는 브라우저에서도
   여는 줄은 옛 모습 그대로 남는다.

   마크업
     <ul class="accordion">
       <li>                                            ← 여는 줄
         <div class="accordion-head" role="button" tabindex="0"
              aria-expanded="false" aria-controls="…">
           <span>번호</span> <strong>제목</strong> <svg>∨</svg>
         </div>
         <div class="accordion-body" id="…"> … </div>
       </li>
       <li><a href="…">                                ← 가는 줄
         <div class="accordion-head">
           <span>번호</span> <strong>제목</strong> <svg>›</svg>
         </div>
       </a></li>
       <li>                                            ← 선 줄
         <div class="accordion-head"><strong>제목</strong></div>
       </li>
     </ul>
   여는 것은 common/js/sub.js — 본문이 없는 줄에서는 손을 떼고 물러난다.
   ───────────────────────────────────────────────────────────────────────── */
.accordion {
    margin:0;
    padding:0;
    list-style:none;
}
/* 한 줄은 «카드» 다 — 세 실제 화면(설교·성경 용어·FAQ)이 모두 이 꼴이었다.
   바탕이 카드를 그리면 스킨은 번호·배지 같은 제 것만 얹으면 된다. */
.accordion > li {
    list-style:none;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:var(--r-lg);
    background:var(--paper);
    box-shadow:var(--sh-soft);
    transition:border-color var(--t-fast), box-shadow var(--t-base);
}
.accordion > li + li {
    margin-top:var(--sp-2);
}
.accordion > li:hover {
    border-color:var(--zone-line);
    box-shadow:var(--sh-card);
}

/* 손잡이 — 번호 · 제목 · 셰브런 세 칸.
   셰브런은 자손으로 찾는다 — 스킨이 배지와 함께 묶어 두는 경우가 있다(설교 목록). */
.accordion-head {
    display:flex;
    align-items:center;
    gap:var(--sp-3);
    box-sizing:border-box;
    padding:var(--sp-4) var(--sp-5);
    cursor:pointer;
    transition:background-color var(--t-fast), color var(--t-fast);
}
.accordion-head > strong,
.accordion-head > h2,
.accordion-head > h3 {
    flex:1;
    min-width:0;
    margin:0;
    color:var(--ink);
    font-size:var(--fs-md);
    font-weight:700;
    line-height:1.5;
    overflow-wrap:anywhere;
}
.accordion-head svg {
    flex:0 0 auto;
    color:var(--muted);
    transition:transform var(--t-fast), color var(--t-fast);
}
.accordion-head:hover {
    background-color:var(--zone-wash);
}
.accordion-head:hover svg {
    color:var(--zone);
}
.accordion-head:focus-visible {
    outline:2px solid var(--zone);
    outline-offset:-3px;
}

/* 열린 상태 — 영역 색 면 + 왼쪽 세로 막대 + 아래 선.
   «지금 이것이 열려 있다» 를 세 겹으로 말한다. 셰브런만 뒤집으면
   목록이 길 때 어느 줄이 열렸는지 눈에 잘 안 들어온다. */
.accordion-head {
    border-bottom:1px solid transparent;
}
.accordion-head.open {
    background-color:var(--zone-soft);
}
.accordion-head.open > strong,
.accordion-head.open > h2,
.accordion-head.open > h3 {
    color:var(--zone-deep);
    font-weight:800;
}
.accordion-head.open svg {
    transform:rotate(180deg);
    color:var(--zone);
}
/* RTL — 막대는 반대쪽에 선다 */
.align-right .accordion-head.open {
    box-shadow:inset -3px 0 0 var(--zone);
}

/* 본문 — 여는 것은 스크립트다. 여기서는 첫 화면에서 닫혀 있게만 한다 */
.accordion-body {
    display:none;
}
.accordion-head.open + .accordion-body {
    display:block;
}

/* ── 본문에 들어오는 것은 두 꼴이다 ────────────────────────────────────────
     글   문단이 그대로 온다 (성경 용어). 여백은 그 화면이 준다.
     목록 «잔줄» 이 온다 (설교 주제 아래의 설교들). 잔줄은 가는 줄의 작은 판이다 —
          번호 · 제목 · 앞 셰브런. 셰브런은 평소 숨어 있다가 손이 닿은 줄에만 나타나
          앞으로 민다. 잔줄마다 화살표가 줄줄이 서면 목록이 아니라 표처럼 읽힌다.

   이 둘을 시스템이 갖지 않으면 화면마다 제 목록을 그린다. 실제로 그랬다 —
   sub.css 는 «왼쪽에 보라색 대시» 를, biblestudy.css 는 «카드 잔줄» 을 그렸고,
   뒤엣것이 앞엣것을 지우려고 li:before {display:none !important} 를 달고 있었다.
   ───────────────────────────────────────────────────────────────────────── */
.accordion-body:has(> ul) {
    box-sizing:border-box;
    padding:var(--sp-2) var(--sp-3) var(--sp-3);
}
.accordion-body > ul {
    display:flex;
    flex-direction:column;
    gap:2px;
    margin:0;
    padding:0;
    list-style:none;
}
.accordion-body > ul > li {
    margin:0;
    padding:0;
    list-style:none;
}
.accordion-body > ul > li > a {
    display:flex;
    align-items:center;
    gap:var(--sp-3);
    box-sizing:border-box;
    min-height:2.75rem;
    padding:var(--sp-3);
    border-radius:var(--r-sm);
    color:var(--copy);
    font-size:var(--fs-base);
    line-height:1.45;
    transition:background-color var(--t-fast), color var(--t-fast);
}
/* 번호는 자릿수를 맞춘다 — 01·02·… 가 세로로 줄이 서야 목록으로 읽힌다 */
.accordion-body .row-num {
    flex:0 0 auto;
    min-width:1.375rem;
    color:var(--muted);
    font-family:var(--font-mono);
    font-size:var(--fs-sm);
    font-weight:500;
    transition:color var(--t-fast);
}
.accordion-body .row-title {
    flex:1;
    min-width:0;
    overflow-wrap:anywhere;
    transition:font-weight var(--t-fast);
}
.accordion-body .ico-arrow {
    flex:0 0 auto;
    color:var(--muted);
    opacity:0;
    transform:translateX(-4px);
    transition:opacity var(--t-fast), transform var(--t-fast), color var(--t-fast);
}
.accordion-body > ul > li > a:hover,
.accordion-body > ul > li > a:focus-visible {
    background-color:var(--zone-wash);
    color:var(--ink);
}
.accordion-body > ul > li > a:focus-visible {
    outline:2px solid var(--zone);
    outline-offset:-2px;
}
.accordion-body > ul > li > a:hover .row-num,
.accordion-body > ul > li > a:focus-visible .row-num {
    color:var(--zone);
}
.accordion-body > ul > li > a:hover .row-title,
.accordion-body > ul > li > a:focus-visible .row-title {
    font-weight:500;
}
.accordion-body > ul > li > a:hover .ico-arrow,
.accordion-body > ul > li > a:focus-visible .ico-arrow {
    opacity:1;
    transform:translateX(0);
    color:var(--zone);
}
/* RTL — 앞은 왼쪽이다. 글리프를 뒤집고 숨은 자리도 반대편에 둔다 */
.align-right .accordion-body .ico-arrow {
    transform:translateX(4px) scaleX(-1);
}
.align-right .accordion-body > ul > li > a:hover .ico-arrow,
.align-right .accordion-body > ul > li > a:focus-visible .ico-arrow {
    transform:translateX(0) scaleX(-1);
}

/* ── 가는 줄 — 본문이 없고 <a> 가 손잡이를 감싼다 ──────────────────────────
   FAQ 가 이 꼴이다. 예전에는 이 목록이 아코디언 클래스를 달고 있어서, 아래를
   보는 셰브런이 «열린다» 고 약속해 놓고 실제로는 상세 화면으로 갔다. 그래서
   여닫기 스크립트가 형제 본문을 못 찾은 채 스크롤 애니메이션만 돌렸다.
   지금은 갈래가 다르다고 시스템이 먼저 말한다. */
.accordion > li > a {
    display:block;
    color:inherit;
}
.accordion > li > a:hover .accordion-head,
.accordion > li > a:focus-visible .accordion-head {
    background-color:var(--zone-wash);
}
.accordion > li > a:hover .accordion-head > strong,
.accordion > li > a:focus-visible .accordion-head > strong {
    color:var(--zone-deep);
}
/* 셰브런은 «앞» 을 가리키고 호버에 그쪽으로 밀린다 — 열리는 것이 아니라 가는 것이다 */
.accordion > li > a:hover .accordion-head svg,
.accordion > li > a:focus-visible .accordion-head svg {
    color:var(--zone);
    transform:translateX(3px);
}
.accordion > li > a:active .accordion-head {
    background-color:var(--zone-soft);
    box-shadow:inset 3px 0 0 var(--zone);
}
.accordion > li > a:focus-visible {
    outline:2px solid var(--zone);
    outline-offset:-3px;
}
/* RTL — 앞은 왼쪽이다. 글리프를 뒤집고 미는 방향도 함께 돌린다 */
.align-right .accordion > li > a .accordion-head svg {
    transform:scaleX(-1);
}
.align-right .accordion > li > a:hover .accordion-head svg,
.align-right .accordion > li > a:focus-visible .accordion-head svg {
    transform:translateX(-3px) scaleX(-1);
}
.align-right .accordion > li > a:active .accordion-head {
    box-shadow:inset -3px 0 0 var(--zone);
}

/* ── 선 줄 — 본문도 링크도 없다 ────────────────────────────────────────────
   설교 주제에 설교가 0건일 때가 이 꼴이다. 예전에는 이런 줄도 손잡이가
   여는 줄과 똑같이 생겨서, 눌러도 빈 칸만 열렸다. 누를 것이 아니라고
   생김새로 말한다 — 셰브런을 지우고, 종이색 면에 글자를 죽인다. */
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) {
    box-shadow:none;
}
.accordion > li:not(:has(.accordion-body)):not(:has(> a)):hover {
    border-color:var(--line);
    box-shadow:none;
    transform:none;
}
/* 면은 손잡이에 준다 — 스킨이 손잡이에 제 배경(흰 종이)을 칠해 두었을 수 있어서,
   줄에만 칠하면 그 흰 면이 위를 덮는다 (설교 목록이 그렇다). */
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head,
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head:hover {
    background-color:var(--paper-warm);
    cursor:default;
}
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head > strong,
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head > h2,
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head > h3 {
    color:var(--muted);
    font-weight:600;
}
/* 셰브런이 남아 있어도 시스템이 지운다 — 여닫히지 않는 줄에 여닫는 표시를 두지 않는다 */
.accordion > li:not(:has(.accordion-body)):not(:has(> a)) > .accordion-head svg {
    display:none;
}

@media (prefers-reduced-motion:reduce) {
    .accordion-head,
    .accordion-head svg,
    .accordion-body > ul > li > a,
    .accordion-body .row-num,
    .accordion-body .row-title,
    .accordion-body .ico-arrow {
        transition:none;
    }
}

/* ── 접이 상자 (resize_box) — 도서 상세 · 성막 소개 공용 ────────────────────────
   «펼쳐 보기»로 여는 긴 본문 상자. 여는 것은 .open 토글(tabernacle.js).

   접혔을 때 높이는 상자를 입는 화면이 --collapsed-h 로 정한다. 예전에는 화면마다
   max-height 를 다시 선언해서, 어느 파일이 늦게 로드되느냐로 이기고 지는 자리였다
   (성막 소개 카드가 480px 대신 1050px 로 펴져 버린 적이 있다).
   그라데이션 가림막 색은 상자 배경과 같아야 해서 --resize-bg 로 함께 넘긴다. */
.resize-box {
    --collapsed-h:65.625rem;
    --resize-bg:var(--paper);
    /* 가림막과 알약은 상자를 기준으로 앉는다 — 그래서 자리 잡기는 컴포넌트가 갖는다.
       예전에는 이 한 줄을 상자를 입는 화면 셋(도서 상세·성막 카드·디자인 표본)이
       저마다 다시 적었다. 하나라도 빠뜨리면 알약이 화면 맨 아래로 떨어진다. */
    position:relative;
    max-height:var(--collapsed-h);
    border-radius:var(--r-xl);
    overflow:hidden;
}
.resize-box.open {
    max-height:none;
}

/* 가림막 — 접혀 있을 때 아래쪽 글이 잘린 것이 아니라 «이어진다» 고 말해 준다.
   단추가 앉을 자리는 완전히 덮는다. 예전에는 가림막이 120px 인데 그 대부분이
   반투명이라, 알약 단추 뒤로 글자가 비쳐 잘린 줄이 그대로 읽혔다. */
.resize-box.has-overflow:not(.open):after {
    position:absolute;
    right:0;
    bottom:0;
    left:0;
    height:var(--veil-h, 9rem);
    border-radius:0 0 inherit inherit;
    background:linear-gradient(to bottom,
        transparent 0%,
        var(--resize-bg) 55%,
        var(--resize-bg) 100%);
    pointer-events:none;
    content:'';
}

/* «더 보기» 알약 — 접이 상자 한 곳에서만 그린다.
   예전에는 도서 상세(알약)와 성막 소개(전폭 띠)가 서로 다른 단추를 갖고 있었다.
   여는 것은 각 화면의 스크립트가 .open 을 토글하는 방식으로 같다. */
.resize-box > .text-toggle {
    position:absolute;
    bottom:1.25rem;
    left:50%;
    transform:translateX(-50%);
    z-index:var(--z-raised);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:var(--sp-2);
    box-sizing:border-box;
    min-height:2.25rem;
    padding:0 var(--sp-5);
    border:1px solid var(--zone-line);
    border-radius:var(--r-pill);
    background:var(--paper);
    color:var(--zone-deep);
    font-size:var(--fs-sm);
    font-weight:800;
    white-space:nowrap;
    cursor:pointer;
    box-shadow:var(--sh-card);
    transition:background-color var(--t-fast), border-color var(--t-fast),
               color var(--t-fast), box-shadow var(--t-base);
}
.resize-box > .text-toggle:hover {
    border-color:var(--zone);
    background:var(--zone-wash);
    box-shadow:var(--sh-gold);
}
/* 펼친 뒤에는 떠 있을 이유가 없다 — 본문 아래 제자리에 선다 */
.resize-box.open > .text-toggle {
    position:static;
    transform:none;
    margin:var(--sp-5) auto 0;
    box-shadow:none;
}
.resize-box.open > .text-toggle .ico-chevron {
    transform:rotate(180deg);
}
/* 넘칠 만큼 길지 않으면 접을 것도 펼 것도 없다 */
.resize-box:not(.has-overflow) > .text-toggle {
    display:none;
}

@media (max-width:1200px) {
    .resize-box {
        --collapsed-h:85vh;
    }
}

/* ── Follow Us 섹션 (section_followUs) — 메인·소개 공용 ────────────────────────── */
/* ── 팔로우 (section_followUs) 및 팔로우 페이지 (follow_page) ────────── */

.section-followUs {
    margin:2rem auto 3rem;
    padding:2.25rem 2rem;
    border:1px solid var(--line-soft);
    border-radius:1.5rem;
    background:var(--paper-warm);
    box-sizing:border-box;
}
.section-followUs h2.title-area {
    margin:0 0 .5rem;
    color:var(--ink);
    font-size:1.5rem;
    font-weight:800;
    letter-spacing:-.035em;
}
.section-followUs p {
    margin:0 0 1.75rem;
    color:var(--copy-soft);
    font-size:.92rem;
    line-height:1.6;
}
.section-followUs .youtube-area {
    margin-bottom:2.25rem;
}
.section-followUs .youtube-area .icon-title {
    display:flex;
    align-items:center;
    gap:.75rem;
    margin-bottom:1.25rem;
}
.section-followUs .youtube-area .icon-title h3 {
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    margin:0;
    color:var(--ink);
    font-size:1.2rem;
    font-weight:800;
}
.section-followUs .youtube-area .icon-title h3 img {
    height:1.375rem;
    width:auto;
}
.section-followUs .youtube-area .icon-title p {
    margin:0;
    color:var(--muted);
    font-size:.85rem;
    flex:1;
}
.section-followUs .youtube-area .BtnPlus {
    margin-left:auto;
    color:var(--gold);
    width:2rem;
    height:2rem;
    border-radius:50%;
    background:var(--paper);
    border:1px solid var(--line-soft);
    box-shadow:var(--sh-soft);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.section-followUs .youtube-area .BtnPlus:hover,
.section-followUs .youtube-area .BtnPlus:focus-visible {
    background:var(--gold);
    border-color:var(--gold);
    color:var(--paper);
    transform:scale(1.1);
}
.section-followUs .youtube-area .BtnPlus svg {
    width:0.875rem;
    height:0.875rem;
}
.section-followUs .youtube-slick {
    position:relative;
    width:100%;
    padding:1.5rem 1.75rem;
    background:var(--paper);
    border:1px solid var(--line-soft);
    border-radius:1.375rem;
    box-shadow:inset 0 1px 2px rgba(255,255,255,.8), 0 4px 20px rgba(0,0,0,.03);
    box-sizing:border-box;
}
.section-followUs .youtube-slick ul {
    margin:0;
    padding:0;
    list-style:none;
    display:flex;
}
.section-followUs .youtube-slick ul:not(.slick-initialized) {
    display:flex;
    overflow:hidden;
    gap:0.75rem;
}
.section-followUs .youtube-slick ul.slick-initialized {
    display:flex;
}
.section-followUs .youtube-slick li {
    text-align:center;
    padding:0.25rem 0.375rem;
    box-sizing:border-box;
    flex-shrink:0;
}
.section-followUs .youtube-links {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0.625rem;
    padding:0.875rem 0.375rem 0.75rem;
    background:var(--paper-warm);
    border:1px solid var(--line-soft);
    border-radius:1rem;
    text-decoration:none;
    text-align:center;
    transition:background var(--t-base), border-color var(--t-base), box-shadow var(--t-base), color var(--t-base), transform var(--t-base);
    box-sizing:border-box;
    cursor:pointer;
}
.section-followUs .youtube-links img {
    width:3.25rem !important;
    height:3.25rem !important;
    max-width:3.25rem !important;
    max-height:3.25rem !important;
    border-radius:50%;
    object-fit:cover;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
    border:2.5px solid var(--paper);
    display:block;
    transition:transform var(--t-fast), box-shadow var(--t-fast);
}
.section-followUs .youtube-links span,
.section-followUs .youtube-links strong {
    font-size:0.7812rem;
    font-weight:700;
    color:var(--ink);
    white-space:nowrap;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    letter-spacing:-.02em;
    line-height:1.2;
    transition:color var(--t-fast);
}
.section-followUs .youtube-links:hover {
    background:var(--paper);
    border-color:var(--gold);
    transform:translateY(-0.25rem);
    box-shadow:0 8px 22px rgba(184, 138, 59, .16);
}
.section-followUs .youtube-links:hover img {
    transform:scale(1.08);
    box-shadow:0 6px 14px rgba(184, 138, 59, .28);
}
.section-followUs .youtube-links:hover span,
.section-followUs .youtube-links:hover strong {
    color:var(--gold-deep);
}

.section-followUs .youtube-area .pager {
    position:absolute;
    top:50%;
    left:0;
    width:100%;
    transform:translateY(-50%);
    display:flex;
    justify-content:space-between;
    pointer-events:none;
    z-index:var(--z-raised);
    box-sizing:border-box;
}
.section-followUs .youtube-area .pager button,
.section-followUs .youtube-area .pager .slick-arrow {
    pointer-events:auto;
    width:2.375rem;
    height:2.375rem;
    border-radius:50%;
    background:var(--paper);
    border:1px solid var(--line-soft);
    box-shadow:0 4px 14px rgba(0,0,0,.08);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.section-followUs .youtube-area .pager button:hover,
.section-followUs .youtube-area .pager .slick-arrow:hover {
    background:var(--gold);
    border-color:var(--gold);
    transform:scale(1.12);
    box-shadow:0 6px 18px rgba(184, 138, 59, .35);
}
.section-followUs .youtube-area .pager button.prev,
.section-followUs .youtube-area .pager .slick-prev {
    margin-left:-1rem;
}
.section-followUs .youtube-area .pager button.next,
.section-followUs .youtube-area .pager .slick-next {
    margin-right:-1rem;
}

/* ── 추천 위젯 (recommend-widget) ──────────────────────────────────────────── */
/* ── 추천 위젯 (recommend-widget) ───────────────────────────────────── */

.recommend-widget {
    position:relative;
    width:var(--fab-size);
    height:var(--fab-size);
    display:flex;
    align-items:center;
    justify-content:center;
    border:solid 1px var(--line);
    padding:.25rem;
    box-sizing:border-box;
    background:var(--paper);
    border-radius:50%;
    box-shadow:var(--sh-card);
    transition:border-color var(--t-fast), transform var(--t-fast);
}
.recommend-widget > [data-role="action"] {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:100%;
    padding:0;
    border:0;
    background:none;
    cursor:pointer;
}
.recommend-widget > [data-role="action"] img {
    width:52%;
    height:auto;
}
.recommend-widget:hover,.recommend-widget:active,.recommend-widget:focus {
    border-color:var(--gold-line);
    transform:translateY(-0.125rem);
}
.recommend-widget .content {
    display:none;
}
.recommend-widget img {
    max-width:100%;
}
.recommend-widget .BtnVisible {
    width:1.625rem;
    height:1.625rem;
    background:var(--paper-warm);
    border:1px solid var(--line-soft);
    border-radius:50%;
    position:absolute;
    top:-0.5rem;
    right:-0.5rem;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
    cursor:pointer;
    transition:background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:var(--z-inlay);
}
.recommend-widget .BtnVisible:hover {
    background-color:var(--gold);
    border-color:var(--gold);
    transform:scale(1.1);
    box-shadow:0 4px 12px rgba(184, 138, 59, .35);
}
.recommend-widget .BtnVisible.show {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328251f' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:center;
    background-size:0.6875rem;
}
.recommend-widget .BtnVisible.show:hover {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}
.recommend-widget .BtnVisible.hide {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328251f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-7.6 7-12.5A7 7 0 1 0 5 8.5C5 13.4 12 21 12 21z'/%3E%3Ccircle cx='12' cy='8.5' r='2.4'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:center;
    background-size:0.75rem;
}
.recommend-widget .BtnVisible.hide:hover {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-7.6 7-12.5A7 7 0 1 0 5 8.5C5 13.4 12 21 12 21z'/%3E%3Ccircle cx='12' cy='8.5' r='2.4'/%3E%3C/svg%3E");
}

.recommend-widget .item {
    width:100%;
}
.recommend-widget .item:first-child {
    padding-bottom:.75rem;
    border-bottom:1px solid var(--line-soft);
}
.recommend-widget .item a {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:.55rem;
    text-align:center;
    text-decoration:none;
    padding:0.375rem 0.25rem;
    border-radius:0.75rem;
    transition:background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.recommend-widget .item a:hover {
    background:var(--paper-warm);
    transform:translateY(-0.125rem);
}
.recommend-widget .item .text-area {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:.25rem;
}
.recommend-widget .item .text-area * {
    font-size:0.75rem;
    font-weight:700;
    color:var(--gold-deep);
    letter-spacing:-.02em;
    line-height:1.25;
}
.recommend-widget .item .text-area img {
    height:0.75rem;
    width:auto;
    filter:drop-shadow(0 1px 2px rgba(184, 138, 59, .25));
}
.recommend-widget .item .img-area {
    width:4.5rem;
    height:6.25rem;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
}
.recommend-widget .item .img-area img {
    max-height:6.25rem;
    max-width:100%;
    width:auto;
    border-radius:0.1875rem 0.375rem 0.375rem 0.1875rem;
    box-shadow:0 4px 14px rgba(31, 26, 18, .22), 0 1px 3px rgba(31, 26, 18, .12);
    object-fit:contain;
    transition:transform var(--t-fast);
}
.recommend-widget .item a:hover .img-area img {
    transform:scale(1.04);
}
.recommend-widget .item .desc-area {
    font-size:0.6875rem;
    font-weight:600;
    color:var(--gold-deep);
    text-align:center;
    line-height:1.35;
    padding:0.3125rem 0.5rem;
    background:var(--gold-wash);
    border-radius:0.5rem;
    width:100%;
    box-sizing:border-box;
    word-break:keep-all;
    overflow-wrap:break-word;
    transition:background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
}
.recommend-widget .item a:hover .desc-area {
    background:var(--gold);
    color:var(--paper);
}

@media (max-width:1024px) {
    .recommend-widget .BtnVisible {
        display:none;
    }
}
@media (max-width:767px) {
    .recommend-widget:hover,.recommend-widget:active,.recommend-widget:focus {
        border-color:var(--gold);
    }
}

/* ── details / summary 아코디언 ────────────────────────────────────────────── */
/* ── details / summary 아코디언 ─────────────────────────────────────── */

details {
    margin-bottom:0.75rem;
    overflow:hidden;
}

summary {
    display:flex;
    align-items:center;
    padding:0.75rem 1rem;
    font-weight:600;
    cursor:pointer;
    list-style:none; /* 기본 삼각형 숨김 */
    position:relative;
    user-select:none;
    transition:background-color var(--t-fast), color var(--t-fast);
}

/* Safari용 기본 삼각형 숨김 */
summary::-webkit-details-marker {
    display:none;
}

/* 커스텀 아이콘 (Chevron) */
summary::before {
    content:"";
    display:inline-block;
    width:0.375rem;
    height:0.375rem;
    border-top:2px solid var(--muted);
    border-right:2px solid var(--muted);
    transform:rotate(45deg); /* 오른쪽 화살표 */
    margin-right:0.75rem;
    transition:transform var(--t-fast), border-color var(--t-fast);
}

/* 열렸을 때 아래 화살표로 회전 */
details[open] > summary::before {
    transform:rotate(135deg);
    border-color:var(--accent); /* 활성 상태 표시 */
}

/* 아코디언 콘텐츠 영역 */
details > *:not(summary) {
    padding:1rem;
    border-top:1px solid var(--line-soft);
    color:var(--copy);
    line-height:1.6;
    background-color:var(--paper);
}

/* ── 빈 상태 (empty_state) ──────────────────────────────────────────────────
   목록·검색·장바구니가 비었을 때 그 자리를 대신 지킨다.

   «없다»는 말만 흐릿하게 남기면 화면이 고장 난 것처럼 보인다. 그래서 종이색 면을
   깔아 자리를 뚜렷이 하고, 골드 링 안에 펼친 책 아이콘을 두어 «내용이 아직 없을
   뿐»임을 말한다. 글자는 캡션색이 아니라 본문색을 쓴다 — 읽으라고 둔 문장이다.
   ───────────────────────────────────────────────────────────────────────── */
.empty-state {
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:var(--sp-4);
    margin:var(--sp-6) 0;
    padding:var(--sp-8) var(--sp-5);
    border:1px solid var(--line);
    border-radius:var(--r-lg);
    background:var(--paper-warm);
    color:var(--copy);
    font-size:var(--fs-md);
    font-weight:600;
    line-height:var(--lh-base);
    text-align:center;
    list-style:none;
    /* 어느 목록에 놓이든 한 칸이 아니라 한 줄을 차지한다 — 도서 목록에서는
       5열 격자에 들어가 220px 로, 옛 float 규칙에 걸려 330px 로 쪼그라들었다 */
    float:none;
    width:auto;
    grid-column:1 / -1;
}
.empty-state:before {
    position:relative;
    box-sizing:border-box;
    width:4rem;
    height:4rem;
    border-radius:var(--r-pill);
    background:var(--gold-soft);
    box-shadow:0 0 0 0.5rem var(--gold-wash);
    content:'';
}
/* 펼친 책 아이콘 — 색은 마스크 바깥에서 준다 (그림 안에 박으면 팔레트를 못 따른다).
   자리는 정적 위치에 맡기지 않고 못박는다: 상자 위 패딩(--sp-8) + 원 안 중앙 여백.
   4rem(패딩) + (4rem 원 − 1.75rem 아이콘) ÷ 2 = 5.125rem */
.empty-state:after {
    position:absolute;
    top:5.125rem;
    left:50%;
    width:1.75rem;
    height:1.75rem;
    margin-left:-0.875rem;
    background:var(--zone);
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A1.5 1.5 0 0 1 5.5 4H10a2 2 0 0 1 2 2v13a1.6 1.6 0 0 0-1.6-1.6H4Z'/%3E%3Cpath d='M20 5.5A1.5 1.5 0 0 0 18.5 4H14a2 2 0 0 0-2 2v13a1.6 1.6 0 0 1 1.6-1.6H20Z'/%3E%3Cpath d='M6.6 8.4h2.6M6.6 11.4h2.6M14.8 8.4h2.6M14.8 11.4h2.6' stroke-dasharray='0.1 3.2'/%3E%3C/svg%3E") no-repeat center / contain;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A1.5 1.5 0 0 1 5.5 4H10a2 2 0 0 1 2 2v13a1.6 1.6 0 0 0-1.6-1.6H4Z'/%3E%3Cpath d='M20 5.5A1.5 1.5 0 0 0 18.5 4H14a2 2 0 0 0-2 2v13a1.6 1.6 0 0 1 1.6-1.6H20Z'/%3E%3Cpath d='M6.6 8.4h2.6M6.6 11.4h2.6M14.8 8.4h2.6M14.8 11.4h2.6' stroke-dasharray='0.1 3.2'/%3E%3C/svg%3E") no-repeat center / contain;
    content:'';
}
.empty-state img {display:none;}   /* 옛 not-found.png 는 그리지 않는다 */

/* ============================================================================
   ui.css — 자체 UI 모듈(nlm-ui.js) 스타일
   ----------------------------------------------------------------------------
   slick.css + slick-theme.css + jquery-star-rating.css 를 대체하고,
   모달(.nlm-modal) 한 벌을 함께 담는다.
   색·간격은 _tokens.css 의 의미 토큰만 참조한다.
   ========================================================================== */

/* ── 캐러셀 ──────────────────────────────────────────────────────────
   컨테이너 자신이 scroll-snap 트랙이다. 자식이 곧 슬라이드.
   .slick-initialized 는 「캐러셀 활성」 마커로 이름만 유지한다. */

.nlmc {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.nlmc::-webkit-scrollbar { display: none; }
.nlmc > .nlmc-item {
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    float: none;
}

/* 화살표 — 문맥별 CSS 가 덮어쓰기 전의 기본형 */
.slick-arrow {
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-input);
    border-radius: 50%;
    background: var(--paper);
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-indent: -624.9375rem;
    box-shadow: var(--sh-soft);
    cursor: pointer;
    transition: border-color var(--t-fast), background-color var(--t-fast), opacity var(--t-fast);
}
.slick-arrow:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
}
.slick-prev:before { transform: translate(-30%, -50%) rotate(-135deg); }
.slick-next:before { transform: translate(-70%, -50%) rotate(45deg); }
.slick-arrow:hover { border-color: var(--gold); background: var(--gold-wash); }
.slick-arrow.slick-disabled { opacity: .3; cursor: default; }
.slick-arrow.slick-disabled:hover { border-color: var(--line-input); background: var(--paper); }

/* RTL 은 논리 방향이 뒤집히므로 화살표 모양도 뒤집는다 */
.align-right .slick-prev:before,
[dir="rtl"] .slick-prev:before { transform: translate(-70%, -50%) rotate(45deg); }
.align-right .slick-next:before,
[dir="rtl"] .slick-next:before { transform: translate(-30%, -50%) rotate(-135deg); }

/* 점 페이저 */
.slick-dots {
    display: flex;
    justify-content: center;
    gap: 0.4375rem;
    margin: var(--sp-4) 0 0;
    padding: 0;
    font-size: 0;
    list-style: none;
}
.slick-dots li { display: block; padding: 0; }
.slick-dots button {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--line-input);
    font-size: 0;
    cursor: pointer;
    transition: background-color var(--t-fast), transform var(--t-fast);
}
.slick-dots li.slick-active button {
    background: var(--gold);
    transform: scale(1.2);
}

/* ── 툴팁/팝오버 ──────────────────────────────────────────────────── */

.nlm-tip {
    position: absolute;
    z-index: var(--z-toast);
    max-width: min(20rem, calc(100vw - 1.5rem));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--paper);
    color: var(--copy);
    box-shadow: var(--sh-pop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-fast);
}
.nlm-tip.is-visible { opacity: 1; visibility: visible; }
.nlm-tip__content {
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-xs);
    line-height: 1.55;
    word-break: break-word;
}
.nlm-tip__arrow {
    position: absolute;
    width: 0.625rem;
    height: 0.625rem;
    border: 1px solid var(--line);
    background: var(--paper);
    transform: translateX(-50%) rotate(45deg);
}
.nlm-tip[data-placement="top"] .nlm-tip__arrow {
    bottom: -0.375rem;
    border-top: 0;
    border-left: 0;
}
.nlm-tip[data-placement="bottom"] .nlm-tip__arrow {
    top: -0.375rem;
    border-bottom: 0;
    border-right: 0;
}

/* 팝오버 테마 — 공유 버튼 */
.nlm-tip--share { border-radius: var(--r-lg); }
.nlm-tip--share .nlm-tip__content { padding: 0.75rem; }
.nlm-tip--share .share-list {
    display: grid;
    grid-template-columns: repeat(3, 3rem);
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nlm-tip--share .share-list li { padding: 0; }
.nlm-tip--share .share-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    transition: background-color var(--t-fast), box-shadow var(--t-fast);
}
.nlm-tip--share .share-list a:hover { background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-line); }
.nlm-tip--share .share-list img { width: 1.75rem; height: 1.75rem; }

/* 팝오버 테마 — 하나의 아이콘이 여러 계정을 품을 때 (Blog & SNS) */
.nlm-tip--accounts { border-radius: var(--r-lg); }
.nlm-tip--accounts .nlm-tip__content { padding: 0.375rem; }
.nlm-tip--accounts .account-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nlm-tip--accounts .account-list li { padding: 0; }
.nlm-tip--accounts .account-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--r-sm);
    color: var(--copy);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
    transition: background-color var(--t-fast), color var(--t-fast);
}
/* 갈 곳이 있다는 표시 — 평소엔 흐리게, 짚으면 금빛으로 */
.nlm-tip--accounts .account-list a::after {
    content: "";
    flex: none;
    width: 0.75rem;
    height: 0.75rem;
    background: currentColor;
    opacity: .35;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: opacity var(--t-fast), transform var(--t-fast);
}
.nlm-tip--accounts .account-list a:hover,
.nlm-tip--accounts .account-list a:focus-visible {
    background: var(--gold-wash);
    color: var(--gold-deep);
}
.nlm-tip--accounts .account-list a:hover::after,
.nlm-tip--accounts .account-list a:focus-visible::after {
    opacity: 1;
    transform: translateX(0.125rem);
}

/* 팝오버 테마 — 도서 추천 위젯 (구 tippy recommend 테마 이식)
   이것만 툴팁 층(--z-toast)에서 내려 놓는다. 툴팁은 모달 안에서도 떠야 하니 위층이
   맞지만, 이 위젯은 화면에 상주하는 패널이라 모달을 가리면 안 된다. */
.nlm-tip--recommend {
    z-index: var(--z-overlay);
    width: 10rem;
    max-width: calc(100vw - 3rem);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-pop);
}
.nlm-tip--recommend .nlm-tip__content {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    min-width: 0;
    padding: .9rem .75rem .75rem;
    border-radius: inherit;
}
.nlm-tip--recommend .item { width: 100%; }
.nlm-tip--recommend .item:first-child {
    padding-bottom: .65rem;
    border-bottom: solid 1px var(--gold-line);
}
.nlm-tip--recommend .item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: .35rem;
    border-radius: var(--r-md);
    text-align: center;
    transition: background-color var(--t-fast), transform var(--t-fast);
}
.nlm-tip--recommend .item a:hover {
    background: var(--gold-wash);
    transform: translateY(-0.125rem);
}
.nlm-tip--recommend .item a * { font-size: .78rem; }
.nlm-tip--recommend .item img { max-width: 100%; }
.nlm-tip--recommend .item .text-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}
.nlm-tip--recommend .item .text-area * {
    font-weight: 800;
    color: var(--gold-deep);
    line-height: 1.3;
}
.nlm-tip--recommend .item .text-area img {
    width: 4rem;
    height: 0.6875rem;
}
.nlm-tip--recommend .item .img-area {
    width: 4.75rem;
    max-width: 50%;
    overflow: hidden;
    border-radius: var(--r-sm);
    box-shadow: var(--sh-card);
}
.nlm-tip--recommend .item .img-area img { display: block; width: 100%; }
.nlm-tip--recommend .desc-area {
    width: 100%;
    padding: .4rem .45rem;
    border-radius: var(--r-sm);
    background: var(--gold-wash);
    color: var(--copy);
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.35;
    box-sizing: border-box;
}
.nlm-tip--recommend .BtnVisible {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    position: absolute;
    top: -.45rem;
    right: -.45rem;
    box-shadow: var(--sh-soft);
    background: var(--gold);
    cursor: pointer;
}
.nlm-tip--recommend .BtnVisible.show {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat center / 0.6875rem, var(--gold);
}
.nlm-tip--recommend .BtnVisible.hide {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5M7 4h10l-1.5 6.5L18 13H6l2.5-2.5L7 4z'/%3E%3C/svg%3E") no-repeat center / 0.75rem, var(--gold);
}

@media (max-width:480px) {
    .nlm-tip--recommend {
        width: 8rem;
        max-width: calc(100vw - 3rem);
    }
    .nlm-tip--recommend .nlm-tip__content {
        padding: .75rem .65rem .65rem;
    }
    .nlm-tip--recommend .item .img-area {
        width: 4.25rem;
    }
}

/* 팝오버 테마 — 유튜브 채널 목록 (구 tippy youtube 테마 이식) */
.nlm-tip--youtube {
    max-width: min(21.875rem, 70vw);
    border-radius: var(--r-xl);
}
.nlm-tip--youtube .nlm-tip__content {
    min-width: 12.5rem;
    padding: 1rem;
    border-radius: inherit;
}
.nlm-tip--youtube ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(20%, 1fr));
    justify-content: center;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nlm-tip--youtube li { padding: 0; }
.nlm-tip--youtube ul img { width: 3.5rem; }
.nlm-tip--youtube .text-ellipsis { font-size: .9rem; }

/* ── 로딩 오버레이 ────────────────────────────────────────────────── */

.nlm-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .65);
    -webkit-backdrop-filter: blur(0.0938rem);
    backdrop-filter: blur(1.5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-fast);
}
.nlm-overlay.is-visible { opacity: 1; visibility: visible; }
.nlm-overlay__spinner,
.nlm-spinner {
    width: 2.75rem;
    height: 2.75rem;
    border: 4px solid var(--gold-soft);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: nlm-spin .8s linear infinite;
}
.nlm-spinner { margin: 1.5rem auto; }
@keyframes nlm-spin { to { transform: rotate(360deg); } }

/* ── 별점 ─────────────────────────────────────────────────────────── */

.nlm-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    vertical-align: middle;
}
.nlm-stars__star {
    position: relative;
    display: inline-block;
    width: var(--star-size, 1.25rem);
    height: var(--star-size, 1.25rem);
    padding: 0;
    border: 0;
    background: none;
    line-height: 0;
}
button.nlm-stars__star { cursor: pointer; }
.nlm-stars__star svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.nlm-stars__empty path { fill: var(--panel-deep); }
.nlm-stars__fill path  { fill: var(--gold-bright); }

/* ── 모달 ────────────────────────────────────────────────────────────
   뼈대는 _components/incModal.php 의 renderModal() 한 벌, 여닫기는
   nlm-ui.js 의 NlmModal 한 벌. 모양은 여기 네 갈래다.

     .nlm-modal--notice    아이콘 + 짧은 안내문, 상자 아래 매달린 동그란 닫기
     .nlm-modal--dialog    제목과 닫기를 얹은 머리띠 + 본문 + 끝 맞춤 단추
     .nlm-modal--panel     화면 높이를 채운 판 — 사진 머리띠 · 본문만 스크롤 ·
                           모바일에서 전체화면 (설문 · 도서 고르기)
     .nlm-modal--lightbox  어두운 유리 위에 내용만 — 흰 상자가 없다
                           (도서 샘플 미리보기 · 배너 미리보기)

   ── 2026-08-29 재설계 ────────────────────────────────────────────────
   앞선 판은 옛 .modal-covid · .pop-survey 의 값을 «그대로 옮겨 온» 것이었다.
   한 벌로 묶는 것이 목적이었으니 값을 그대로 두었는데, 묶고 나서 보니 그 값들이
   설계가 아니라 잔재였다.

     · 대화창 머리띠 70px 이 통째로 비고 제목은 구분선 «아래»로 밀려 있었다.
       제목을 담지 않는 머리띠는 띠가 아니라 여백이다 — 제목을 띠 안으로 넣었다.
     · 단추가 240×54 두 짝이라 780px 상자의 절반이 단추였다. 안내창의 단추는
       문장이지 배너가 아니다 — 내용에 맞춰 줄이고 끝으로 몰았다(주 단추가 끝).
     · 안내문 상자가 950px 이었다. 두 줄짜리 문장을 908px 폭에 가운데 정렬하면
       줄이 바뀔 때마다 눈이 시작점을 다시 찾는다. 34rem 으로 좁혔다.
     · 닫기 × 는 12×12 배경 이미지였고 획 색(#28251f)이 그림 안에 박혀 있었다.
       마스크로 그려 색을 바깥에서 받게 하고, 누를 자리를 2.25rem 으로 넓혔다.
     · 상자 모서리가 아래 두 귀만 둥글어 위가 잘려 보였다. 네 귀를 함께 둥글리고,
       영역 색 3px 띠는 그 위에 얹었다.
   ───────────────────────────────────────────────────────────────── */

.nlm-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: var(--sp-5) var(--sp-3);
    background: var(--veil);
    overflow-y: auto;
    opacity: 0;
    transition: opacity var(--t-fast);
}
.nlm-modal[hidden] { display: none; }
.nlm-modal.is-open { opacity: 1; }

.nlm-modal__box {
    position: relative;
    margin: auto;
    box-sizing: border-box;
    border-radius: var(--r-xl);
    background: var(--paper);
    box-shadow: var(--sh-pop);
}

/* 머리띠 — 제목과 닫기가 함께 산다 */
.nlm-modal__head {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    /* 제목이 없는 머리띠(배너 미리보기처럼)에서는 닫기가 끝에 선다 */
    justify-content: flex-end;
    box-sizing: border-box;
    min-height: 3.5rem;
    /* 논리 속성 — RTL 에서 제목 쪽 여백이 저절로 따라간다 */
    padding-block: var(--sp-3);
    padding-inline: var(--sp-5) var(--sp-3);
    border-bottom: 1px solid var(--line);
}
.nlm-modal__head > .nlm-modal__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* 닫기 × — 사이트에서 한 벌이다. 모달도 팝오버도 이것을 쓴다.
   색을 그림 안에 박지 않는다: 마스크로 그리고 currentColor 를 받는다.
   12×12 배경 이미지였을 때는 누를 자리가 손가락보다 작았고, 언어 팝오버는
   2px 짜리 막대 둘을 X 자로 겹쳐 놓아 호버도 초점 링도 없었다. */
.btn-close,
.nlm-modal__x {
    flex: 0 0 auto;
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--muted);
    font-size: 0;
    cursor: pointer;
    transition: background-color var(--t-fast), color var(--t-fast);
}
.btn-close:before,
.nlm-modal__x:before {
    position: absolute;
    inset: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat center / 1rem;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat center / 1rem;
    content: '';
}
.btn-close:hover,
.nlm-modal__x:hover {
    background: var(--panel);
    color: var(--ink);
}
.btn-close:focus-visible,
.nlm-modal__x:focus-visible {
    outline: 2px solid var(--zone);
    outline-offset: 2px;
}

/* 발 — 동작 단추는 여기 산다. 본문 끝에 딸려 붙어 있으면 글이 길어질수록
   단추가 어디쯤 오는지 알 수 없고, 본문만 구르는 판형에서는 아예 스크롤 밖으로
   밀려난다. 발은 머리와 짝이다 — 위에서 «무엇인가»를 말하고 아래에서 «어떻게 할까»를 묻는다.
   너비는 내용이 정한다. 예전에는 min-width 15rem 이 박혀 있어 «취소» 두 글자도 240px 였다. */
.nlm-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    justify-content: flex-end;
    box-sizing: border-box;
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--line);
    background: var(--paper-warm);
}
.nlm-modal__foot > button {
    min-width: 8.75rem;
    height: 3rem;
    padding: 0 var(--sp-5);
    font-size: var(--fs-md);
    font-weight: 700;
    border-radius: var(--r-md);
}

/* ── 안내문형 ─────────────────────────────────────────────────────── */

.nlm-modal--notice .nlm-modal__box {
    width: 100%;
    max-width: 34rem;
    border: 1px solid var(--line);
    overflow: hidden;
    text-align: center;
}
.nlm-modal--notice .nlm-modal__inner {
    box-sizing: border-box;
    padding: var(--sp-6);
}
/* 안내 아이콘 — 데이터 URI 안에는 CSS 변수가 치환되지 않는다. 그래서 예전에는
   골드(#a57c1b)가 그림 안에 박혀 있어, 영역 팔레트를 바꿔도 이 아이콘만 굳어
   있었다. 마스크로 그려 색은 바깥에서 준다.
   제목이 아니라 본문 묶음에 매단다 — 제목 없는 안내문에서도 아이콘은 선다. */
.nlm-modal--notice .nlm-modal__inner:before {
    display: block;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto var(--sp-4);
    background: var(--zone);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v4h1'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v4h1'/%3E%3C/svg%3E") no-repeat center / contain;
    content: '';
}
.nlm-modal--notice .nlm-modal__title {
    margin: 0 0 var(--sp-3);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ink);
}
.nlm-modal--notice .nlm-modal__body {
    font-size: var(--fs-md);
    line-height: 1.75;
    color: var(--copy);
}
.nlm-modal--notice .nlm-modal__body p + p { margin-top: 0.75em; }
/* 안내문의 단추는 한가운데 — 상자가 좁고 글이 가운데 정렬이라 끝으로 몰면 어긋난다 */
.nlm-modal--notice .nlm-modal__foot {
    justify-content: center;
}

/* 닫기 × — 대화창과 같은 자리(오른쪽 위 모서리)에 둔다.
   예전에는 상자 «아래»에 골드 동그라미가 매달려 있었다. 옛 covid 팝업이 쓰던
   표식인데, 상자 밖으로 삐져나와 뒤 내용을 가리고, 닫는 자리가 이 모달만 달랐다.
   닫는 자리는 사이트에서 한 곳이어야 손이 기억한다. */
.nlm-modal--notice .nlm-modal__x {
    position: absolute;
    top: var(--sp-3);
    inset-inline-end: var(--sp-3);
}

/* ── 대화창형 ─────────────────────────────────────────────────────── */

.nlm-modal--dialog .nlm-modal__box {
    width: 100%;
    max-width: 40rem;
    /* 위 테두리도 영역 축을 따른다. 예전에는 여기만 var(--accent)(보라) 고정이라,
       같은 모달 안에서 단추는 골드인데 테두리만 보라로 갈라져 있었다. */
    border-top: 3px solid var(--zone);
    overflow: hidden;
}
.nlm-modal--dialog .nlm-modal__inner {
    box-sizing: border-box;
    padding: var(--sp-6) var(--sp-5);
}
.nlm-modal--dialog .nlm-modal__body,
.nlm-modal--dialog .nlm-modal__body p {
    font-size: var(--fs-md);
    line-height: 1.7;
    color: var(--copy);
}
.nlm-modal--dialog .nlm-modal__body p + p { margin-top: 1em; }

/* ── 판형 (panel) ─────────────────────────────────────────────────────
   화면 높이를 채우고 본문만 구르는 판. 설문과 도서 고르기가 이 꼴이다.
   머리는 사진이고, 사진 위에 로고·제목·닫기가 앉는다. 발은 단추 두 짝.
   모바일에서는 전체화면이 된다 — 손 안에서 이 판은 «화면» 이지 «창» 이 아니다.

   사진은 화면이 --banner 로 넘긴다. 컴포넌트가 그림 주소를 알 필요는 없다. */

.nlm-modal--panel .nlm-modal__box {
    display: flex;
    flex-direction: column;
    width: 34.375rem;
    max-width: 100%;
    height: min(55rem, 90vh);
    overflow: hidden;
}
.nlm-modal--panel .nlm-modal__banner {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-2);
    box-sizing: border-box;
    height: var(--banner-h, 11.25rem);
    padding: 0 var(--sp-5);
    background: var(--panel-deep) var(--banner, none) no-repeat 63% center / cover;
    color: var(--paper);
}
.nlm-modal--panel .nlm-modal__brand {
    width: 11.25rem;
    max-width: 50%;
    /* 로고는 한 가지 색으로 찍힌 PNG 다 — 사진 위에서는 흰 실루엣으로 세운다 */
    filter: brightness(0) invert(1);
}
.nlm-modal--panel .nlm-modal__banner .nlm-modal__title {
    margin: 0;
    color: var(--paper);
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 3px 4px .5rem rgba(24, 18, 10, .35);
}
/* 사진 위의 닫기 — 어두운 알약 위에 흰 × */
.nlm-modal--panel .nlm-modal__x {
    position: absolute;
    top: var(--sp-2);
    right: var(--sp-2);
    width: 2rem;
    height: 2rem;
    background: rgba(24, 18, 10, .7);
    color: var(--paper);
}
.nlm-modal--panel .nlm-modal__x:hover {
    background: rgba(24, 18, 10, .9);
    color: var(--paper);
}
.align-right .nlm-modal--panel .nlm-modal__x {
    right: auto;
    left: var(--sp-2);
}
.align-right .nlm-modal--panel .nlm-modal__banner {
    background-position-x: 94%;
}
/* 본문만 구른다 — 판 자체는 화면에 붙어 있어야 머리와 발이 늘 보인다 */
.nlm-modal--panel .nlm-modal__inner {
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    padding: var(--sp-5);
    overflow-y: auto;
    overflow-x: hidden;
}
/* 탭을 실으면 탭이 머리에 붙고 그 아래만 구른다 */
.nlm-modal--panel .nlm-modal__inner:has(> .tabs) {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.nlm-modal--panel .nlm-modal__inner > .tabs {
    flex: 0 0 auto;
    margin: 0;
}
.nlm-modal--panel .nlm-modal__inner > .tab-contents {
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    padding: var(--sp-5);
    overflow-y: auto;
    overflow-x: hidden;
}
/* 판형의 발 — 판이 화면을 채우므로 단추도 폭을 나눠 갖는다 */
.nlm-modal--panel .nlm-modal__foot {
    flex: 0 0 auto;
    gap: 0;
    padding: 0;
    background: none;
}
.nlm-modal--panel .nlm-modal__foot > button {
    flex: 1 1 0;
    min-width: 0;
    height: 4rem;
    border: 0;
    border-radius: 0;
}
/* RTL — 글은 오른쪽에서 시작한다. 단추 글자는 늘 가운데다 */
.align-right .nlm-modal--panel .nlm-modal__inner *:not(button) {
    text-align: right;
}

/* ── 라이트박스형 (lightbox) ──────────────────────────────────────────
   흰 상자가 없다. 어두운 유리를 깔고 그림만 남긴다 — 도서 샘플과 배너처럼
   «볼 것이 이미 사각형» 일 때는 종이 위에 다시 얹을 이유가 없다.
   머리의 글자와 단추는 유리 위에 서므로 흰 계열로 뒤집는다. */

/* 위아래 숨 쉴 자리는 «가림막의 여백» 이 갖는다. 상자는 그 안을 100% 로 채우고
   (96vh 가 아니다 — 96vh + 여백은 화면보다 커서 가림막 자체가 굴렀다), 구르는 것은
   목록 하나뿐이다. 가림막에 overflow:hidden 을 둬 스크롤이 두 겹이 되지 않게 한다. */
.nlm-modal--lightbox {
    padding: var(--sp-6) var(--sp-4);
    background: var(--veil-deep);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    overflow: hidden;
}
.nlm-modal--lightbox .nlm-modal__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(57.5rem, 96vw);
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.nlm-modal--lightbox .nlm-modal__head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    width: 100%;
    min-height: 0;
    padding: 0 0 var(--sp-4);
    border-bottom: 0;
    color: var(--paper);
}
.nlm-modal--lightbox .nlm-modal__title {
    color: var(--paper);
    font-size: var(--fs-base);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nlm-modal--lightbox .nlm-modal__x {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .12);
    color: var(--paper);
}
.nlm-modal--lightbox .nlm-modal__x:hover {
    background: rgba(255, 255, 255, .28);
    color: var(--paper);
}
.nlm-modal--lightbox .nlm-modal__inner {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    padding-bottom: var(--sp-2);
    overflow-y: auto;
    overflow-x: hidden;
    /* 목록 끝에서 더 굴려도 뒤 화면으로 넘어가지 않는다 */
    overscroll-behavior: contain;
}
/* 유리 위에 뜬 것에는 테두리 대신 빛과 그림자를 준다 */
.nlm-modal--lightbox .nlm-modal__stage {
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .12);
}

/* ── 반응형 ───────────────────────────────────────────────────────── */

@media screen and (max-width:767px) {
    .nlm-modal--notice .nlm-modal__box { padding: var(--sp-5) var(--sp-5) var(--sp-6); }
    .nlm-modal--notice .nlm-modal__title { font-size: 1.1875rem; }
    .nlm-modal--notice .nlm-modal__inner:before { width: 3rem; height: 3rem; }
    /* 판형은 손 안에서 «화면» 이 된다 */
    .nlm-modal--panel { padding: 0; }
    .nlm-modal--panel .nlm-modal__box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .nlm-modal--panel .nlm-modal__banner { --banner-h: 7.5rem; }
    /* 손 안에서는 유리의 여백을 줄인다 — 그림이 볼 것의 전부다 */
    .nlm-modal--lightbox { padding: var(--sp-5) var(--sp-3); }
}

@media screen and (max-width:480px) {
    .nlm-modal--notice .nlm-modal__body { font-size: var(--fs-base); }
    .nlm-modal--dialog .nlm-modal__inner { padding: var(--sp-5) var(--sp-4); }
    .nlm-modal__head { padding-inline-start: var(--sp-4); }
    .nlm-modal__foot { padding: var(--sp-4); }
    /* 좁은 화면에서는 단추가 쌓인다 — 주 단추가 위에 오도록 순서를 뒤집는다 */
    .nlm-modal__foot {
        flex-direction: column-reverse;
        flex-wrap: nowrap;
    }
    .nlm-modal__foot > button { width: 100%; }
    .nlm-modal--panel .nlm-modal__foot { flex-direction: row; padding: 0; }
    .nlm-modal--panel .nlm-modal__foot > button { height: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .nlmc { scroll-behavior: auto; }
    .nlm-overlay__spinner { animation-duration: 1.6s; }
    .nlm-modal,
    .btn-close,
    .nlm-modal__x { transition: none; }
}
