/* pager */
.notice-pager{
    margin-top: 14px;
    display:flex;
    justify-content:center;
}

.pg{
    display:flex; align-items:center; gap:10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.03);
}

.pg-btn{
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.10);
    text-decoration:none;
}

.pg-btn:hover{ background: rgba(255,255,255,.06); }
.pg-btn.is-disabled{ opacity: .45; }

.pg-pages{ display:flex; gap:6px; align-items:center; }
.pg-page, .pg-ellipsis{
    min-width: 34px;
    height: 34px;
    display:flex; align-items:center; justify-content:center;
    border-radius: 10px;
    text-decoration:none;
    border: 1px solid rgba(255,255,255,.08);
}

.pg-page:hover{ background: rgba(255,255,255,.06); }
.pg-page.is-active{
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.18);
    font-weight: 800;
}

.notice-head-row{
    display:flex;
    align-items:center;
    justify-content: space-between; /*  양끝 배치 */
    gap:12px;
    flex-wrap: nowrap;

    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,.08); /*  라이트 배경 기준: 검정 계열 */
}

/* 다크 테마일 때만 흰색 라인으로(선택) */
@media (prefers-color-scheme: dark){
    .notice-head-row{
        border-bottom-color: rgba(255,255,255,.10);
    }
}

.notice-count{
    flex: 0 0 auto;               /*  줄어들지 않게 */
    white-space: nowrap;
}

.notice-toolbar{
    margin-left: auto;             /*  오른쪽으로 밀기(보험) */
    display:flex;
    justify-content:flex-end;
}

.notice-toolbar .nt-right{
    display:flex;
    justify-content:flex-end;
}

.nt-search{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap: nowrap;            /*  검색 영역도 한 줄 */
}

/* 검색 input 폭이 너무 커서 내려가는 걸 방지 */
.nt-search input{
    width: clamp(180px, 28vw, 260px);
}

/* 아주 좁은 화면에서만 2줄 허용(선택) */
@media (max-width: 380px){
    .notice-head-row{ flex-wrap: wrap; }
    .notice-toolbar{ margin-left: 0; width: 100%; }
    .notice-toolbar .nt-right{ justify-content:flex-end; width:100%; }
    .nt-search input{ width: 100%; }
}
@media (max-width: 520px){
    .notice-count{
        display:none;
    }

    .notice-head-row{
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .notice-toolbar{
        width: 100%;
        margin-left: 0;
    }

    .notice-toolbar .nt-right{
        width: 100%;
    }

    .nt-search{
        width: 100%;
        display:flex;
        gap: 8px;
    }

    /*  핵심: 기존 width:240px 죽이고, flex로 꽉 채우기 */
    .nt-search input{
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .nt-search button{
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* ===== notice view upgrades ===== */

.nv-top{
    display:flex;
    justify-content:flex-end;
    margin: 6px 0 12px;
}

.nv-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.06);
    text-decoration:none;
}

.nv-btn--ghost:hover{
    background: rgba(0,0,0,.03);
}

/* 제목 크기 조금 줄이기 */
.nv-title--sm{
    font-size: 16px;
}

/* 내용 박스 라인 */
.nv-content-box{
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark){
    .nv-btn{ border-color: rgba(255,255,255,.10); }
    .nv-btn--ghost:hover{ background: rgba(255,255,255,.06); }
    .nv-content-box{ border-top-color: rgba(255,255,255,.06); }
}

/* 첨부영역(내용 박스 안) */
.nv-attach--inbox{
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark){
    .nv-attach--inbox{ border-top-color: rgba(255,255,255,.06); }
}

.nv-attach-list{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top: 10px;
}

.nv-attach-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.04);
    text-decoration:none;
}

.nv-attach-item:hover{
    background: rgba(0,0,0,.03);
}

@media (prefers-color-scheme: dark){
    .nv-attach-item{
        border-color: rgba(255,255,255,.10);
        background: rgba(255,255,255,.04);
    }
    .nv-attach-item:hover{
        background: rgba(255,255,255,.06);
    }
}

.nv-attach-name{
    flex:1;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    font-size: 13px;
    opacity:.95;
}

.nv-attach-action{
    flex:0 0 auto;
    font-size: 12px;
    opacity:.75;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.06);
}

@media (prefers-color-scheme: dark){
    .nv-attach-action{
        border-color: rgba(255,255,255,.10);
        background: rgba(255,255,255,.06);
    }
}

/* 하단 버튼(이전/목록/다음) */
.nv-actions{
    margin-top: 16px;
    display:grid;
    grid-template-columns: 1fr auto 1fr;
    gap:10px;
}

.nv-action{
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.04);
    text-decoration:none;
    padding: 12px 12px;
    display:flex;
    flex-direction:column;
    gap:6px;
    min-height: 62px;
}

.nv-action:hover{
    background: rgba(0,0,0,.03);
}

@media (prefers-color-scheme: dark){
    .nv-action{
        border-color: rgba(255,255,255,.10);
        background: rgba(255,255,255,.04);
    }
    .nv-action:hover{
        background: rgba(255,255,255,.06);
    }
}

.nv-action--list{
    align-items:center;
    justify-content:center;
    padding: 12px 14px;
    min-width: 140px;
}

.nv-action--disabled{
    opacity: .55;
    pointer-events:none;
}

.nv-action-top{
    font-size: 12px;
    font-weight: 800;
    opacity:.75;
}

.nv-action-title{
    font-size: 13px;
    line-height: 1.35;
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp: 2;          /*  두 줄 */
    -webkit-box-orient: vertical;
}

/* 모바일: 1열로 */
@media (max-width: 520px){
    .nv-actions{
        grid-template-columns: 1fr;
    }
    .nv-action--list{
        min-width: auto;
    }
}

/* ===== nv-head: desktop 1-line / mobile 2-lines ===== */
.nv-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;  /*  웹: 한 줄 양끝 */
    gap:12px;
}

.nv-title{
    margin:0;
    min-width:0;
    flex:1;
}

.nv-meta{
    margin-top: 0;                 /*  웹: 제목과 같은 줄 */
    white-space: nowrap;           /*  메타 줄바꿈 방지 */
    flex: 0 0 auto;
}

/* 모바일: 두 줄(제목 -> 메타) */
@media (max-width: 520px){
    .nv-head{
        flex-direction: column;
        align-items: flex-start;
    }
    .nv-meta{
        margin-top: 8px;
        white-space: normal;
    }
}

/* ===== bottom nav: prev/next only, web only ===== */
.nv-actions{
    margin-top: 16px;
    display:grid;
    grid-template-columns: 1fr 1fr; /*  이전/다음 2칸 */
    gap:10px;
}

/* 웹에서만 보이게 */
@media (max-width: 520px){
    .nv-actions--webonly{
        display:none !important;
    }
}

@media (min-width: 521px){
    .nv-title{
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
}

/* 본문 아래 숨 쉴 공간 */
.nv-content-box{
    padding-bottom: 6px; /* 기존보다 살짝만 */
}

.nv-body{
    /* 본문과 아래 섹션 간격 늘리기 */
    margin-bottom: 28px;
}

/*  첨부/링크: 큰 박스 -> 가벼운 섹션 */
.nv-resources{
    margin-top: 18px;          /* 본문에서 아래로 떨어짐 */
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.nv-resources__head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin-bottom: 10px;
}

.nv-resources__title{
    font-weight:800;
    font-size: 13px;           /* 작게 */
    letter-spacing: -0.02em;
}

.nv-resources__desc{
    font-size: 12px;
    opacity: .65;
    white-space:nowrap;
}

/* 2열 카드 리스트(모바일은 1열) */
.nv-resources__grid{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:10px;
}
@media (max-width: 720px){
    .nv-resources__grid{ grid-template-columns: 1fr; }
    .nv-resources__desc{ display:none; }
}

/* 아이템(요즘 스타일: 얇은 카드 + hover) */
.nv-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.60);
    text-decoration:none;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.nv-item:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    background: rgba(255,255,255,.85);
}

.nv-item__left{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.nv-item__name{
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width: 320px;
}

.nv-item__right{
    font-size: 12px;
    opacity: .75;
    white-space:nowrap;
}

/* 뱃지(칩) */
.nv-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.04);
}

.nv-badge--link{
    background: rgba(59,130,246,.10);
    border-color: rgba(59,130,246,.18);
}

/*  이전/다음: 아래로 더 내려서 답답함 제거 */
.nv-actions{
    margin-top: 26px;      /* 더 아래로 */
    padding-top: 18px;
    border-top: 1px dashed rgba(0,0,0,.10);
}

/* 기존 버튼이 크면 살짝 슬림하게 */
.nv-action{
    border-radius: 16px;
    padding: 14px 14px;
}
.nv-action-title{
    opacity:.92;
}

/* ===== notice editor content ===== */
.editor-content{
    font-size:15px;
    line-height:1.9;
    color:#111827;
    word-break:keep-all;
    overflow-wrap:anywhere;
}

.editor-content > *:first-child{ margin-top:0; }
.editor-content > *:last-child{ margin-bottom:0; }

.editor-content p{
    margin:0 0 1em;
}

.editor-content br{
    line-height:1.9;
}

.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4{
    margin:1.5em 0 .7em;
    font-weight:800;
    line-height:1.45;
    color:#0f172a;
}

.editor-content h1{ font-size:28px; }
.editor-content h2{ font-size:24px; }
.editor-content h3{ font-size:20px; }
.editor-content h4{ font-size:17px; }

.editor-content ul,
.editor-content ol{
    margin:.8em 0 1.1em;
    padding-left:1.5em !important;
}

.editor-content ul{
    list-style:disc outside !important;
}

.editor-content ul ul{
    list-style:circle outside !important;
}

.editor-content ul ul ul{
    list-style:square outside !important;
}

.editor-content ol{
    list-style:decimal outside !important;
}

.editor-content ol ol{
    list-style:lower-alpha outside !important;
}

.editor-content ol ol ol{
    list-style:lower-roman outside !important;
}

.editor-content li{
    display:list-item !important;
    list-style:inherit !important;
    margin:.28em 0;
}

.editor-content li::marker{
    color:#111827;
}

.editor-content a{
    color:#2563eb;
    text-decoration:underline;
    word-break:break-all;
}

.editor-content img{
    display:block;
    max-width:100%;
    height:auto;
    margin:14px auto;
    border-radius:14px;
}

.editor-content blockquote{
    margin:1.1em 0;
    padding:14px 16px;
    border-left:4px solid #93c5fd;
    background:#eff6ff;
    color:#1e3a8a;
    border-radius:0 12px 12px 0;
}

.editor-content table{
    width:100%;
    border-collapse:collapse;
    margin:1em 0 1.2em;
    font-size:14px;
}

.editor-content th,
.editor-content td{
    padding:10px 12px;
    border:1px solid #dbeafe;
    text-align:left;
    vertical-align:top;
}

.editor-content th{
    background:#eff6ff;
    color:#1d4ed8;
    font-weight:700;
}

.editor-content hr{
    border:0;
    border-top:1px solid #e5e7eb;
    margin:1.5em 0;
}

@media (max-width: 768px){
    .editor-content{
        font-size:14px;
        line-height:1.8;
    }

    .editor-content h1{ font-size:24px; }
    .editor-content h2{ font-size:21px; }
    .editor-content h3{ font-size:18px; }
    .editor-content h4{ font-size:16px; }

    .editor-content table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }
}

/* ===== Notice detail hero ===== */
.nv-card--hero{
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(15,23,42,0.06);
}

.nv-hero{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    padding:28px 28px 22px;
    border-bottom:1px solid #eef2f7;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,0.08), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.nv-hero__left{
    min-width:0;
    flex:1;
}

.nv-hero__right{
    flex-shrink:0;
    display:flex;
    align-items:flex-start;
}

.nv-hero__badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:30px;
    padding:0 12px;
    border-radius:999px;
    background:#eff6ff;
    border:1px solid #bfdbfe;
    color:#1d4ed8;
    font-size:12px;
    font-weight:800;
    margin-bottom:14px;
}

.nv-hero__title{
    margin:0;
    font-size:25px;
    line-height:1.35;
    font-weight:900;
    letter-spacing:-0.03em;
    color:#0f172a;
    word-break:keep-all;
}

.nv-hero__meta{
    margin-top:18px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}

.nv-meta-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:36px;
    padding:0 12px;
    border-radius:999px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    color:#334155;
    font-size:13px;
    font-weight:700;
}

.nv-meta-chip__label{
    color:#64748b;
    font-weight:700;
}

.nv-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:42px;
    padding:0 16px;
    border-radius:12px;
    text-decoration:none;
    font-size:14px;
    font-weight:800;
    transition:all .16s ease;
}

.nv-btn--line{
    color:#0f172a;
    background:#fff;
    border:1px solid #dbe4ee;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.nv-btn--line:hover{
    background:#f8fafc;
    border-color:#cbd5e1;
    transform:translateY(-1px);
}

.nv-content-box{
    padding:26px 28px 30px;
}

@media (max-width: 768px){
    .nv-hero{
        padding:22px 18px 18px;
        flex-direction:column;
        align-items:stretch;
    }

    .nv-hero__right{
        width:100%;
    }

    .nv-btn--line{
        width:100%;
    }

    .nv-hero__title{
        font-size:18px;
        line-height:1.4;
    }

    .nv-content-box{
        padding:20px 18px 24px;
    }

    .nv-meta-chip{
        font-size:12px;
    }
}
