/*
 * GOMGOM compact — auth / logout / push-alarm modals
 * Shared across archive, glab, my (header partial). Not loaded on reader.
 */

.compact-modal-layer {
    position: absolute;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.compact-modal-layer.is-open {
    display: flex;
}

.compact-modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, .42);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.compact-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100% - 48px);
    overflow-y: auto;
    /* overscroll-behavior는 상속되지 않는다 — html/body에 이미 none이 걸려있어도
       이 카드처럼 자체 overflow-y:auto인 중첩 스크롤 컨테이너는 따로 안 막으면
       바깥으로 오버스크롤이 체이닝돼 브라우저 네이티브 당겨서 새로고침을 트리거할
       수 있다(핸들 드래그 중 실제로 재현됨, 2026-08-04). */
    overscroll-behavior: contain;
    padding: 28px 24px calc(24px + var(--gomgom-safe-bottom, 0px));
    border-radius: 28px 28px 0 0;
    background: var(--gomgom-color-paper);
    box-shadow: var(--gomgom-shadow-floating);
    box-sizing: border-box;
    animation: gomgomModalRise .22s cubic-bezier(.22, 1, .36, 1);
}

/* 바텀시트 핸들 — 실제 엘리먼트(드래그해서 닫기용). 히트 영역은 눈에 보이는 바보다 크게 잡는다.
   데스크톱 폭(가운데 정렬 다이얼로그로 바뀌는 지점)에서는 드래그 닫기 자체가 의미 없어서 숨김. */
.compact-modal-handle {
    margin: -8px auto 10px;
    width: 64px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.compact-modal-handle span {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--gomgom-color-line);
}

.compact-modal-handle:active {
    cursor: grabbing;
}

@keyframes gomgomModalRise {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 449px) {
    .compact-modal-layer {
        align-items: center;
        padding: 24px;
    }

    .compact-modal-card {
        max-width: 360px;
        border-radius: var(--gomgom-card-radius, 26px);
    }

    .compact-modal-handle {
        display: none;
    }
}

.compact-modal-kicker {
    margin: 0 0 10px;
    color: var(--gomgom-color-violet);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.compact-modal-title {
    margin: 0;
    font-family: 'KoPubWorldBatang', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.02em;
    word-break: keep-all;
}

.compact-modal-body {
    margin: 10px 0 0;
    color: var(--gomgom-color-muted);
    font-size: 13px;
    line-height: 1.62;
    word-break: keep-all;
}

.compact-modal-footnote {
    margin: 16px 0 0;
    color: var(--gomgom-color-muted);
    font-size: 11px;
    line-height: 1.55;
    word-break: keep-all;
}

.compact-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.compact-social-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: var(--gomgom-control-radius, 999px);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--gomgom-color-line);
    background: var(--gomgom-color-paper);
    color: var(--gomgom-color-ink);
}

.compact-social-btn:active {
    opacity: .7;
}

.compact-social-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--gomgom-color-line);
    overflow: hidden;
    transform: translateY(-50%);
}

.compact-social-icon svg {
    display: block;
}

.is-kakao .compact-social-icon svg {
    width: 15px;
    height: 15px;
}

.is-naver .compact-social-icon svg,
.is-google .compact-social-icon svg {
    width: 26px;
    height: 26px;
}

.compact-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.compact-modal-actions .secondary,
.compact-modal-actions .primary {
    flex: 1;
    margin: 0;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 서신 목록 — 아카이브 story 카드와 같은 문법(카드 radius/보더/칩), 배경은 항상 흰색 */
.compact-notify-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compact-notify-card {
    position: relative;
    padding: 15px 15px 15px 17px;
    border: 1px solid var(--gomgom-color-line);
    border-radius: 20px;
    background: var(--gomgom-color-paper);
    text-decoration: none;
    color: inherit;
    display: block;
}

.compact-notify-card.is-unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    bottom: 15px;
    width: 3px;
    border-radius: 3px;
    background: var(--gomgom-color-violet);
}

.compact-notify-chip {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 8px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: var(--gomgom-color-violet);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.compact-notify-title {
    margin: 0 0 5px;
    font-family: 'KoPubWorldBatang', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    word-break: keep-all;
}

.compact-notify-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gomgom-color-muted);
    font-size: 10.5px;
}

.compact-notify-empty {
    padding: 26px 0;
    text-align: center;
    color: var(--gomgom-color-muted);
    font-size: 13px;
}

.compact-notify-inbox-link {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
