/* ============================================================
   리브레토 마케팅 — 책 라이브러리 (Phase -1)
   - 모든 색/간격/폰트 = styles.css CSS 변수
   - 모바일 표준 사전 준수: 폼 44-48px, 폰트 16px+, 풀스크린 모달, FAB
   ============================================================ */

/* ===== 패널 컨테이너 ===== */
#panelBooks {
    /* 사이드바 폭만큼 좌측 밀림 + 헤더 아래 */
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background: var(--bg-primary);
    -webkit-overflow-scrolling: touch;
}

.bk-root {
    padding: 24px 28px 80px;
    max-width: 1280px;
    margin: 0 auto;
    font-family: var(--font-sans);
}

/* ===== 툴바 ===== */
.bk-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.bk-toolbar__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.bk-toolbar__heading {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.bk-toolbar__count {
    font-size: 12px;
    color: var(--text-muted);
}
.bk-toolbar__filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.bk-search,
.bk-filter {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    height: 36px;
    transition: border-color .12s, box-shadow .12s;
}
.bk-search { flex: 1; min-width: 180px; }
.bk-filter { min-width: 140px; }
.bk-search:focus,
.bk-filter:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(111, 143, 114, .18);
}
.bk-add-btn { white-space: nowrap; height: 36px; }

/* 데스크톱 ≥ 769px: 한 줄 정렬 */
@media (min-width: 769px) {
    .bk-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .bk-toolbar__filters { flex: 1; justify-content: flex-end; max-width: 600px; }
}

/* ===== 카드 그리드 ===== */
.bk-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.bk-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, border-color .12s;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.bk-card:hover,
.bk-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--sage);
    outline: none;
}
.bk-card__cover {
    aspect-ratio: 3 / 4;
    background: var(--bg-secondary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-card__cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bk-card__cover-ph {
    font-size: 48px;
    color: var(--text-muted);
    opacity: .35;
}
.bk-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.bk-card__title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
    /* 두 줄 클램프 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bk-card__subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bk-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.bk-card__meta-empty {
    color: var(--text-muted);
    font-style: italic;
    opacity: .7;
}
.bk-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    gap: 8px;
}

/* ===== 상태 뱃지 ===== */
.bk-card__status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.4;
}
.bk-card__status[data-status="planning"] {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.bk-card__status[data-status="editing"] {
    background: var(--blue-light);
    color: var(--blue);
}
.bk-card__status[data-status="marketing"] {
    background: var(--sage-light);
    color: var(--sage-dark);
}
.bk-card__status[data-status="published"] {
    background: var(--amber-light);
    color: var(--amber);
}
.bk-card__status[data-status="archived"] {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ===== D-day ===== */
.bk-card__dday {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.bk-card__dday.is-today {
    background: var(--amber-light);
    color: var(--amber);
}
.bk-card__dday.is-future {
    background: var(--sage-light);
    color: var(--sage-dark);
}
.bk-card__dday.is-past {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ===== 빈 상태 ===== */
.bk-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}
.bk-empty__icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .5;
}
.bk-empty__title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.bk-empty__desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

/* ===== FAB (모바일) ===== */
.bk-fab {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--sage);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    z-index: 60;
    transition: transform .12s, background .12s;
    /* iOS safe area */
    bottom: calc(24px + env(safe-area-inset-bottom));
}
.bk-fab:hover { background: var(--sage-dark); }
.bk-fab:active { transform: scale(.96); }

/* ===== 모달 (데스크톱: 가운데 모달) ===== */
.bk-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-modal[hidden] { display: none; }

.bk-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    animation: bk-fade-in .14s ease-out;
}
.bk-modal__panel {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
    animation: bk-pop-in .16s ease-out;
    overflow: hidden;
}
@keyframes bk-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bk-pop-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bk-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}
.bk-modal__title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.bk-modal__close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 22px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}
.bk-modal__close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.bk-modal__body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.bk-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}
.bk-modal__status {
    font-size: 11px;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bk-modal__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.bk-modal__delete {
    color: var(--red);
    border-color: var(--red-light);
}
.bk-modal__delete:hover {
    background: var(--red-light);
}

body.bk-modal-open { overflow: hidden; }

/* ===== 탭 (정보 / 시장조사) — 마이그 013 ===== */
.bk-tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
    padding: 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}
.bk-tabs::-webkit-scrollbar { display: none; }
.bk-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .12s, border-color .12s;
    white-space: nowrap;
    min-height: 44px;
}
.bk-tab:hover:not(:disabled) {
    color: var(--text-primary);
}
.bk-tab.is-active {
    color: var(--sage-dark);
    border-bottom-color: var(--sage);
}
.bk-tab:disabled,
.bk-tab.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* 탭 패널 */
.bk-tab-panel {
    display: none;
}
.bk-tab-panel.is-active {
    display: block;
}

/* ===== 시장조사 패널 ===== */
.bk-market {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 4px 0;
}
.bk-market--empty {
    padding: 60px 20px;
    text-align: center;
}
.bk-market--loading {
    padding: 60px 20px;
    text-align: center;
}
.bk-market__loader {
    font-size: 13px;
    color: var(--text-muted);
}
.bk-market--error {
    padding: 40px 20px;
    text-align: center;
}
.bk-market__error {
    font-size: 13px;
    color: var(--red);
    margin: 0 0 12px;
}
.bk-market__hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}
.bk-market__primary {
    margin-left: 8px;
}
.bk-market__primary strong {
    color: var(--sage-dark);
}
.bk-market__warn {
    font-size: 12px;
    color: var(--amber);
    margin: 0 0 8px;
}
.bk-market__note {
    font-size: 11px;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.5;
}

/* ===== 섹션 ===== */
.bk-market__section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    padding: 14px 16px;
}
.bk-market__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.bk-market__title {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bk-market__badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sage-light);
    color: var(--sage-dark);
}
.bk-market__cache {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-muted);
}
.bk-market__cache--fresh {
    background: var(--blue-light);
    color: var(--blue);
}
.bk-market__more {
    font-size: 12px;
    color: var(--sage-dark);
    text-decoration: none;
    white-space: nowrap;
}
.bk-market__more:hover {
    text-decoration: underline;
}

/* ===== 키워드 칩 ===== */
.bk-market__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.bk-market__chip {
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    min-height: 32px;
}
.bk-market__chip:hover {
    background: var(--sage-light);
    border-color: var(--sage);
    color: var(--sage-dark);
}
.bk-market__chip.is-active {
    background: var(--sage);
    border-color: var(--sage);
    color: #fff;
}
.bk-market__chip--empty {
    cursor: default;
    background: transparent;
    border: 1px dashed var(--border-light);
    color: var(--text-muted);
    font-style: italic;
}
.bk-market__chip--empty:hover {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-muted);
}
.bk-market__ai-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-color: var(--sage);
    color: var(--sage-dark);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.bk-market__ai-btn:disabled {
    opacity: .55;
    cursor: progress;
}

/* ===== 알라딘 베스트셀러 그리드 ===== */
.bk-market__books {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.bk-market__book {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    text-decoration: none;
    color: inherit;
    transition: border-color .12s, transform .12s, box-shadow .12s;
    position: relative;
}
.bk-market__book:hover {
    border-color: var(--sage);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.bk-market__book-rank {
    position: absolute;
    top: 4px;
    left: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    z-index: 1;
}
.bk-market__book-cover {
    width: 50px;
    height: 70px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 2px;
    background: var(--bg-secondary);
}
.bk-market__book-cover--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    opacity: .35;
}
.bk-market__book-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bk-market__book-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bk-market__book-meta {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bk-market__no-books {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}
.bk-market__no-books a {
    display: inline-block;
    margin-top: 8px;
    color: var(--sage-dark);
}

/* ===== iframe 임베드 ===== */
.bk-market__iframe-wrap {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    /* 4:3 비율 (트렌드 그래프에 적합) */
    aspect-ratio: 4 / 3;
    width: 100%;
    min-height: 240px;
}
.bk-market__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.bk-market__iframe-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== 빠른 링크 ===== */
.bk-market__quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.bk-market__quick-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--sage-dark);
    text-decoration: none;
    font-size: 12px;
    transition: background .12s, border-color .12s;
}
.bk-market__quick-link:hover {
    background: var(--sage-light);
    border-color: var(--sage);
}

/* ===== 모바일 (≤768px) ===== */
@media (max-width: 768px) {
    .bk-tabs {
        padding: 0 4px;
    }
    .bk-tab {
        padding: 10px 14px;
        font-size: 13px;
    }
    .bk-market__books {
        grid-template-columns: 1fr;
    }
    .bk-market__book-cover {
        width: 60px;
        height: 84px;
    }
    .bk-market__book-title {
        font-size: 13px;
    }
    .bk-market__iframe-wrap {
        aspect-ratio: 4 / 3;
        min-height: 280px;
    }
    .bk-market__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .bk-market__more {
        font-size: 13px;
    }
    .bk-market__chip {
        min-height: 36px;
        font-size: 14px;
        padding: 8px 14px;
    }
    .bk-market__ai-btn {
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .bk-market__iframe-wrap {
        aspect-ratio: 1 / 1;
    }
}

/* ===== 폼 ===== */
.bk-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bk-form__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bk-form__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}
.bk-form__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.bk-form__req {
    color: var(--red);
    margin-left: 2px;
}
.bk-form__input {
    font-family: var(--font-sans);
    font-size: 16px;       /* iOS 줌 방지 */
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 44px;
    transition: border-color .12s, box-shadow .12s;
    box-sizing: border-box;
    width: 100%;
}
.bk-form__textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.5;
}
.bk-form__textarea--lg {
    min-height: 100px;
    font-family: var(--font-sans);
    font-size: 14px;
}

/* 보강 필드 구분선 (마이그 007) */
.bk-form__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 6px;
    color: var(--text-muted);
}
.bk-form__divider::before,
.bk-form__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}
.bk-form__divider-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.bk-form__input:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(111, 143, 114, .18);
}
.bk-form__hint {
    font-size: 11px;
    color: var(--text-muted);
}
.bk-form__hint.is-over {
    color: var(--red);
    font-weight: 600;
}

/* ===== ISBN 자동기입 ===== */
.bk-isbn {
    display: flex;
    gap: 6px;
    align-items: stretch;
}
.bk-isbn__input {
    flex: 1;
    min-width: 0;
}
.bk-isbn__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 44px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--sage);
    color: var(--sage-dark);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .12s, color .12s;
}
.bk-isbn__btn:hover:not(:disabled) {
    background: var(--sage-light);
}
.bk-isbn__btn:active:not(:disabled) {
    transform: translateY(1px);
}
.bk-isbn__btn:disabled {
    opacity: .55;
    cursor: progress;
}
.bk-isbn__btn-icon {
    font-size: 14px;
    line-height: 1;
}
.bk-isbn__status {
    font-size: 11px;
    color: var(--text-muted);
    min-height: 14px;
    line-height: 1.4;
    margin-top: 2px;
}
.bk-isbn__status[data-kind="success"] { color: var(--sage-dark); }
.bk-isbn__status[data-kind="warn"]    { color: var(--amber); }
.bk-isbn__status[data-kind="error"]   { color: var(--red); }
.bk-isbn__status[data-kind="info"]    { color: var(--text-secondary); }
.bk-isbn__overwrite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}
.bk-isbn__overwrite input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--sage);
    margin: 0;
}

/* 모바일: 텍스트 라벨 숨기고 아이콘만 (작은 화면 절약) */
@media (max-width: 480px) {
    .bk-isbn__btn-label { display: none; }
    .bk-isbn__btn {
        width: 44px;
        padding: 0;
        justify-content: center;
    }
    .bk-isbn__btn-icon { font-size: 18px; }
}

/* ===== 모바일 (≤768px) ===== */
@media (max-width: 768px) {
    /* 패널이 사이드바 폭만큼 밀린 상태 → 모바일에선 0 */
    #panelBooks {
        left: 0;
    }
    .bk-root {
        padding: 16px 14px 100px;
    }

    .bk-toolbar__heading { font-size: 18px; }
    .bk-toolbar__filters { width: 100%; }
    .bk-search,
    .bk-filter {
        font-size: 16px;
        height: 44px;
        padding: 10px 12px;
    }
    /* 모바일에선 추가 버튼은 FAB 으로 대체 → 툴바 버튼 숨김 */
    .bk-add-btn { display: none; }
    .bk-fab { display: flex; align-items: center; justify-content: center; }

    .bk-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .bk-card__cover {
        /* 한 줄 가로 카드로 보이도록 축소 */
        aspect-ratio: 16 / 10;
    }

    /* 모달 풀스크린 슬라이드업 */
    .bk-modal__panel {
        width: 100vw;
        max-width: none;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        animation: bk-slide-up .2s ease-out;
    }
    @keyframes bk-slide-up {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .bk-modal__header {
        padding: 14px 16px;
        position: sticky;
        top: 0;
        background: var(--bg-white);
        z-index: 2;
    }
    .bk-modal__body {
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    .bk-modal__footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        flex-wrap: wrap;
    }
    .bk-modal__status {
        flex-basis: 100%;
        order: 3;
        text-align: center;
    }
    .bk-modal__actions {
        flex: 1;
        justify-content: flex-end;
    }
    .bk-modal__actions .btn,
    .bk-modal__actions .btn-confirm {
        min-height: 44px;
        font-size: 14px;
        padding: 0 14px;
    }

    /* 폼 그리드 → 단일 컬럼 */
    .bk-form__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* 작은 모바일 (≤480px) */
@media (max-width: 480px) {
    .bk-card__cover {
        aspect-ratio: 16 / 9;
    }
    .bk-fab {
        right: 16px;
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
