/* ============================================================
   SNU ECE 공지방 — core.css
   뷰 모드(데스크탑/모바일)와 무관한 공통 레이어.
   토큰, 타이포, 버튼, 폼, 모달, 카드, 태그, 필터.
   레이아웃(레일 배치·그리드 열 수)은 desktop.css / mobile.css가 맡는다.
   원칙: 모서리 0, 그림자 없음, 1px 테두리, 네이비 단색, 흰 바탕.
   ============================================================ */

:root {
    /* 사이트 전체 강조색을 레일 남색 하나로 통일한다. 버튼·테두리·제목·탭 밑줄이
       모두 같은 색을 쓰도록 primary 계열을 레일 색과 같은 값으로 맞춘다. */
    --primary: #1f3f8f;
    --primary-deep: #1f3f8f;
    --primary-hover: #17337a;
    --primary-light: #eaf0fb;
    /* 좌우 고정 레일 색. 서울대 엠블럼 배경의 밝은 남색에 맞춰 통일했다.
       엠블럼 이미지 배경과 정확히 이어지게 하려면 이 값을 엠블럼 배경색과 똑같이 맞춘다. */
    --rail-bg: #1f3f8f;
    --rail-bg-deep: #17337a;
    --rail-text: #ffffff;
    --rail-text-dim: #c4d1ea;
    --rail-width: 240px;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1a1d21;
    --text-sub: #6b7280;
    --border: #e3e5e9;
    --border-soft: #eef0f3;
    --danger: #c0392b;
    --danger-bg: #fdf2f0;
    --urgent-bg: #fdfaf9;
    --bell-on: #f2b705;
    --ok: #2f6b48;
    --ok-bg: #eef5f0;
    --field-bg: #ffffff;
    --radius: 0;
    --serif: 'Nanum Myeongjo', Batang, '바탕', 'AppleMyungjo', serif;
}

* { box-sizing: border-box; font-family: 'Pretendard', 'Malgun Gothic', system-ui, sans-serif; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-main);
    line-height: 1.55;
}

.page-shell { width: 100%; margin: 0 auto; }
.page-main { width: 100%; max-width: 1400px; margin: 0 auto; padding: 40px; }
/* ---------- 사이트 푸터 ----------
   세 영역(링크 그리드 / 동기화 상태 / 법적 고지)을 그리드 영역 이름으로 배치한다.
   모바일에서 순서를 바꿔야 하므로 flex order 대신 영역 재배치를 쓴다. */
.site-footer {
    display: grid;
    grid-template-areas: "links" "sync" "legal";
    margin-top: 72px;
    /* 아래 여백은 푸터가 전부 갖는다. page-main의 바닥 패딩과 겹쳐
       어중간한 합이 나오지 않도록 0으로 두고 여기서만 정한다. */
    padding: 34px 4px 0;
    color: #8a919d;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
    line-height: 1.7;
}
.site-footer-grid {
    display: grid;
    grid-area: links;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: stretch;
    gap: 24px 20px;
}
.footer-column { min-width: 0; }
.footer-column-title {
    margin: 0 0 12px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.1px;
}
.footer-link-list { margin: 0; padding: 0; list-style: none; }
.footer-link-list li { margin: 0; }
.footer-link-list a,
.footer-link-list button,
.footer-link-list .footer-link-muted {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 0;
    color: #6f7885;
    background: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}
.footer-link-list a:hover,
.footer-link-list button:hover { color: var(--primary); }
.footer-link-list a:focus-visible,
.footer-link-list button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 아직 문서가 없는 항목. 색만으로 구분되지 않도록 title로도 알린다. */
.footer-link-muted { color: #b3b9c2; cursor: default; }
.footer-external-icon { width: 11px; height: 11px; flex-shrink: 0; opacity: 0.7; }

/* 영역 2 — 수집 신선도 */
.site-footer-sync {
    display: flex;
    grid-area: sync;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    color: #6f7885;
    font-size: 12px;
}
.footer-sync-icon { width: 14px; height: 14px; flex-shrink: 0; }
.footer-sync-label { font-weight: 700; }
.footer-sync-detail { font-variant-numeric: tabular-nums; }
.site-footer-sync[data-state="stale"] .footer-sync-icon,
.site-footer-sync[data-state="stale"] .footer-sync-label { color: #8a6d1f; }
.site-footer-sync[data-state="failed"] .footer-sync-icon,
.site-footer-sync[data-state="failed"] .footer-sync-label { color: var(--danger); }

/* 영역 3 — 면책과 카피라이트 */
.site-footer-legal {
    display: flex;
    grid-area: legal;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 0 30px;
    border-top: 1px solid var(--border-soft);
}
.footer-legal-text { min-width: 0; }
.site-footer p { margin: 2px 0; font-size: 12px; }
.footer-admin-link {
    flex-shrink: 0;
    padding: 5px 10px;
    color: #a2a9b4;
    background: transparent;
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-admin-link:hover { color: #6f7885; border-color: #c9ced6; }
.footer-admin-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 좌우 고정 레일 (공통 외형) ----------
   위치 고정과 표시 여부는 뷰별 CSS가 정한다. 여기에는 색·간격만 둔다. */
.site-rail {
    background: var(--rail-bg);
    color: var(--rail-text);
    flex-direction: column;
    /* 워드마크가 들어오며 세로가 길어졌다. 한 화면에 들어오도록 간격을 조인다. */
    gap: 18px;
    padding: 22px 22px 20px;
}
/* 로고 버튼. 서울대 엠블럼 이미지가 있으면 그걸, 없으면 명조 워드마크로 떨어진다.
   엠블럼은 배경을 깔지 않고 레일 남색 위에 그대로 얹어 배경과 자연스럽게 이어지게 한다.
   (엠블럼 PNG는 배경 투명 또는 레일과 같은 남색으로 준비하는 게 가장 깔끔하다.) */
.brand-logo-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.brand-logo-btn:hover { opacity: 0.9; }
.brand-logo-btn:focus-visible { outline: 2px solid var(--rail-text); outline-offset: 4px; }
.brand-rail,
.brand-rail * {
    -webkit-user-drag: none;
    user-select: none;
}
.brand-logo-img {
    display: block;
    width: 100%;
    max-width: 154px;
    height: auto;
    margin: 0 auto;
}
/* 엠블럼이 없을 때의 대체 워드마크. 남색 위에서 흰 명조로 중앙 정렬한다. */
.brand-mark {
    display: grid;
    width: 100%;
    place-items: center;
    padding: 8px 0;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--rail-text);
    text-align: center;
}
.brand-university-name {
    margin: -16px 0 -14px;
    color: var(--rail-text);
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
}
/* 서비스 워드마크. 레일 폭에 맞춰 줄고 위아래 여백만 갖는다. */
.brand-wordmark {
    display: block;
    width: 100%;
    max-width: 196px;
    height: auto;
    margin: -4px auto 2px;
    -webkit-user-drag: none;
}
.brand-site-name[hidden] { display: none; }
/* 한 줄로 둔다. 레일 폭이 좁아도 줄이 접히지 않게 글자 크기를 조인다. */
.brand-site-name {
    margin: 0;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: -0.01em;
    text-align: center;
    white-space: nowrap;
}
.brand-links { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.brand-links a,
.brand-links button {
    color: var(--rail-text);
    background: transparent;
    border: 0;
    padding: 7px 0;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.brand-links a:hover,
.brand-links button:hover { text-decoration: underline; }
.inquiry-links { gap: 4px; }
.rail-admin-link { margin-top: 2px; }
.rail-clock {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: var(--rail-text);
    font-variant-numeric: tabular-nums;
}
.rail-clock strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: 0.04em; }
.rail-clock span { display: block; margin-top: 6px; color: var(--rail-text-dim); font-size: 13px; line-height: 1.5; font-weight: 600; }
/* 서랍 뒤를 덮는 막. 모바일 모드에서만 mobile.css가 켠다. */
.drawer-scrim { display: none; }
.rail-section-label {
    margin: 0;
    color: var(--rail-text-dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

/* 학내 홍보 레일 — 남색 바탕 위에 얹히므로 글자는 밝게 간다 */
.ad-rail { justify-content: flex-start; }
.rail-right { padding: 0; }
#right-rail-ad-content {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}
.rail-ad-viewport {
    display: flex;
    width: 100%;
    min-height: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}
/* 무대는 레일이 남긴 세로 공간을 전부 가져간다. 비율로 높이를 묶어 두면
   레일 아래쪽이 남색으로 비므로, 여기서는 높이를 제한하지 않는다. */
.rail-ad-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}
.rail-ad-stage.is-swiping { cursor: grabbing; }
/* 슬라이드를 가로로 늘어놓고 트랙만 움직인다. 트랙 폭은 무대와 같으므로
   translateX(-100%) 한 번이 정확히 한 장 분량이 된다. */
.rail-ad-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition-property: transform;
    transition-duration: 460ms;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0.24, 1);
    will-change: transform;
}
.rail-ad-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.rail-ad-slide.is-broken { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
    .rail-ad-track { transition-duration: 0ms !important; }
}
.rail-ad-item + .rail-ad-item { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.18); }
.ad-rail h2 {
    display: -webkit-box;
    margin: 12px 0 8px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.45;
    word-break: keep-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.ad-rail p {
    display: -webkit-box;
    margin: 0 0 16px;
    overflow: hidden;
    color: var(--rail-text-dim);
    font-size: 13.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.rail-cta {
    display: inline-block; padding: 9px 12px;
    border: 1px solid var(--rail-text); background: transparent; color: var(--rail-text);
    font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.rail-cta:hover { background: var(--rail-text); color: var(--rail-bg); }
.rail-ad-link { display: block; width: 100%; color: inherit; text-decoration: none; }
.rail-ad-image-link { position: relative; display: block; width: 100%; height: 100%; }
/* 레일을 끝까지 메우는 흐린 배경. 잘려도 무방한 층이라 cover로 채운다. */
.rail-ad-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(26px) saturate(1.15) brightness(0.86);
    transform: scale(1.25);
    pointer-events: none;
}
/* 배너 원본은 비율을 지켜 통째로 보인다. */
.rail-ad-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    object-fit: contain;
    background: transparent;
    border: 0;
    outline: 0;
    -webkit-user-drag: none;
}
.rail-ad-controls {
    position: absolute;
    inset: 0;
    /* 배너 링크(.rail-ad-link)보다 위에 있어야 클릭이 버튼에 닿는다. */
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
}
.rail-ad-arrow {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--rail-text);
    background: rgba(12, 34, 78, 0.52);
    border: 1px solid rgba(255,255,255,0.6);
    font: inherit;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    backdrop-filter: blur(5px);
    transition: color 0.16s ease, background-color 0.16s ease,
        opacity 0.2s ease, transform 0.16s ease;
}
.rail-ad-arrow svg { width: 17px; height: 17px; }
/* 화살표는 평소엔 숨어 있다가 가리키거나 초점이 갈 때만 나타난다.
   터치 기기에는 hover가 없으므로 항상 보이게 둔다. */
.rail-ad-stage:hover .rail-ad-arrow,
.rail-ad-arrow:focus-visible { opacity: 1; }
@media (hover: none) {
    .rail-ad-arrow { opacity: 1; }
}
.rail-ad-arrow:hover,
.rail-ad-arrow:focus-visible {
    color: var(--rail-bg);
    background: var(--rail-text);
    outline: none;
}
.rail-ad-arrow:active { transform: scale(0.94); }
.rail-ad-status {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 10px;
    pointer-events: none;
}
.rail-ad-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: rgba(12, 34, 78, 0.55);
    border-radius: 999px;
    pointer-events: auto;
    backdrop-filter: blur(6px);
}
.rail-ad-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    background: rgba(255, 255, 255, 0.42);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: width 0.24s ease, background-color 0.24s ease;
}
.rail-ad-dot.is-active { width: 18px; background: #fff; border-radius: 999px; }
.rail-ad-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rail-ad-count {
    padding: 3px 8px;
    color: #fff;
    background: rgba(12, 34, 78, 0.55);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(6px);
}
.brand-links a:focus-visible,
.brand-links button:focus-visible,
.rail-cta:focus-visible,
.rail-ad-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 0;
    margin-bottom: 26px;
    border-bottom: 0;
}
.header-title-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* 워드마크가 제목 자리를 대신한다. 글자 제목은 이미지가 없을 때만 나온다. */
.site-title-mark { display: block; width: auto; height: 62px; -webkit-user-drag: none; }
.site-title-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.site-title.is-text .site-title-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.header h1, .site-title {
    font-family: var(--serif);
    color: var(--primary-deep);
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    word-break: keep-all;
}

/* 알림 종. 꺼짐은 흑백, 켜짐은 노란색. */
.bell-toggle {
    background: none;
    border: 0;
    padding: 4px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    filter: grayscale(1) opacity(0.55);
    transition: filter 0.15s, transform 0.15s;
}
.bell-toggle:hover { filter: grayscale(1) opacity(0.85); transform: scale(1.08); }
.bell-toggle.active { filter: none drop-shadow(0 0 0 var(--bell-on)); }
.bell-toggle[aria-pressed="true"] { filter: none; }
.bell-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* ---------- 카테고리 탭 (서울대 소식 스타일 밑줄 탭) ---------- */
.category-tabs {
    display: flex;
    align-items: stretch;
    height: 64px;
    border-top: 3px solid var(--primary-deep);
    border-bottom: 2px solid var(--primary-deep);
    margin-bottom: 28px;
    overflow-x: auto;
    overflow-y: hidden;           /* overflow-x:auto 가 세로 스크롤바(▲●▼)를 부르는 걸 막는다 */
    overscroll-behavior-x: contain;
}
.category-tabs-inner {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: stretch;
    justify-content: space-evenly;
    gap: 0;
    width: 100%;
    min-width: 0;
    padding: 0;
}
.category-tab {
    display: flex;
    align-items: center;          /* 텍스트 세로 가운데 정렬 */
    justify-content: flex-start;
    flex: 0 0 auto;
    background: none;
    border: 0;
    padding: 0 2px;
    margin-bottom: -2px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-sub);
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
}
.category-tab:hover { color: var(--primary); }
.category-tab.active {
    color: var(--primary-deep);
    font-weight: 800;
    border-bottom-color: var(--primary-deep);
}
.category-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }

/* 빠른 필터 — 여러 개를 동시에 켤 수 있는 토글이라 알약 모양을 쓴다.
   켜진 상태를 색만으로 알리지 않도록 체크 표시가 함께 펼쳐진다. */
.notice-quick-filters {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: -12px 0 16px;
    flex-wrap: wrap;
}
.notice-quick-filters button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    color: #4a5567;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: 0 1px 2px rgba(22, 45, 92, 0.05);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.1px;
    white-space: nowrap;
    cursor: pointer;
    transition: color 190ms cubic-bezier(0.33, 1, 0.68, 1),
        background-color 190ms cubic-bezier(0.33, 1, 0.68, 1),
        border-color 190ms cubic-bezier(0.33, 1, 0.68, 1),
        box-shadow 190ms cubic-bezier(0.33, 1, 0.68, 1),
        transform 150ms cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.16s ease;
}
/* 켜졌을 때만 폭이 열리는 체크. 끌 때도 같은 곡선으로 접힌다. */
.notice-quick-filters button::before {
    content: '✓';
    width: 0;
    margin-right: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 11px;
    font-weight: 800;
    transition: width 190ms cubic-bezier(0.33, 1, 0.68, 1),
        margin-right 190ms cubic-bezier(0.33, 1, 0.68, 1),
        opacity 150ms ease;
}
.notice-quick-filters button:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-color: #b8c8e6;
    box-shadow: 0 3px 8px rgba(22, 45, 92, 0.1);
    transform: translateY(-1px);
}
.notice-quick-filters button.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    /* 위쪽 안쪽 하이라이트로 살짝 볼록한 명암을 준다. */
    box-shadow: 0 3px 9px rgba(31, 63, 143, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.notice-quick-filters button.active::before { width: 11px; margin-right: 5px; opacity: 1; }
.notice-quick-filters button.active:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 11px rgba(31, 63, 143, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.notice-quick-filters button:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 1px 2px rgba(22, 45, 92, 0.08);
}
.notice-quick-filters button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .notice-quick-filters button,
    .notice-quick-filters button::before { transition: none; }
}
.rail-ad-fallback {
    margin: 22px;
    border-radius: 8px;
}

/* ---------- Buttons ---------- */
.btn {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.16s ease, box-shadow 0.16s ease,
        background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}
.btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(30, 64, 137, 0.16);
}
.btn:active { transform: translateY(1px) scale(0.985); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.btn-outline { background: white; color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: white; color: var(--danger); border-color: #e3c6c1; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }

.filter-btn,
.category-tab,
.notice-pagination button,
.detail-back,
.bell-toggle,
.mobile-menu-btn,
.close-btn,
.rail-cta,
.brand-links a,
.brand-links button,
.gallery-thumb,
.detail-image-nav {
    transition: transform 0.16s ease, box-shadow 0.16s ease,
        background-color 0.16s ease, border-color 0.16s ease,
        color 0.16s ease, opacity 0.16s ease;
}
.filter-btn:hover,
.notice-pagination button:hover:not(:disabled),
.detail-back:hover,
.bell-toggle:hover,
.mobile-menu-btn:hover,
.close-btn:hover,
.rail-cta:hover,
.gallery-thumb:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 53, 112, 0.13);
}
.filter-btn:active,
.category-tab:active,
.notice-pagination button:active:not(:disabled),
.detail-back:active,
.bell-toggle:active,
.mobile-menu-btn:active,
.close-btn:active,
.rail-cta:active,
.brand-links a:active,
.brand-links button:active,
.gallery-thumb:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: none;
}

/* ---------- 검색 & 필터 ---------- */
.search-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 28px;
}
.search-wrapper > .notice-quick-filters { order: -1; }
.search-container {
    display: flex;
    align-items: center;
    padding: 0 0 16px;
}
.search-field {
    display: grid;
    width: min(100%, 760px);
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;
    padding: 0 5px 0 18px;
    border: 2px solid var(--primary);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(24, 62, 143, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.search-field:focus-within {
    border-color: var(--primary-deep);
    box-shadow: 0 8px 24px rgba(24, 62, 143, 0.16);
    transform: translateY(-1px);
}
.search-container input {
    width: 100%;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 15px;
    background: transparent;
    outline: none;
}
.search-container input::-webkit-search-cancel-button { cursor: pointer; }
.search-submit {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--primary);
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.search-submit:hover,
.search-submit:focus-visible {
    color: #fff;
    background: var(--primary);
    outline: none;
}
.search-submit:active { transform: scale(0.92); }

.filter-toggle-bar {
    border: 1px solid var(--border);
    padding: 0 14px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; min-height: 42px; transition: 0.15s; user-select: none;
}
.filter-toggle-bar:hover { background: var(--primary-light); }
.filter-toggle-bar.has-active { background: var(--primary-light); border-color: var(--primary); }
.filter-toggle-label { font-size: 13px; font-weight: 700; color: var(--text-sub); display: flex; align-items: center; gap: 7px; }
.filter-toggle-bar.has-active .filter-toggle-label { color: var(--primary); }
.filter-active-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; padding: 0 12px; }
.filter-chip {
    background: var(--primary); color: white; font-size: 11.5px; font-weight: 600;
    padding: 3px 9px; display: flex; align-items: center; gap: 5px;
}
.filter-chip button { background: none; border: none; color: rgba(255,255,255,0.85); cursor: pointer; font-size: 13px; padding: 0; line-height: 1; }
.filter-chip button:hover { color: white; }

.filter-panel {
    display: none;
    border: 1px solid var(--border); border-top: none;
    padding: 20px 20px 22px;
}
.filter-panel.open { display: block; }
.filter-panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 20px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group-label { font-size: 12px; font-weight: 700; color: var(--text-sub); letter-spacing: 0.03em; }
.filter-select {
    min-height: 35px;
    padding: 7px 10px;
    color: #374151;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0;
    font: inherit;
    font-size: 12.5px;
}
.filter-select:focus { border-color: var(--primary); outline: none; }
.filter-btn-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
    background: white; color: #4b5563;
    border: 1px solid var(--border); border-radius: 0;
    padding: 6px 12px; font-size: 12.5px; font-weight: 600;
    cursor: pointer; transition: 0.15s;
}
.filter-btn:hover { border-color: #b9c0cb; }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.filter-panel-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.filter-result-count {
    font-size: 12.5px; color: var(--text-sub); display: flex; align-items: center;
    margin-right: auto; font-weight: 600; font-variant-numeric: tabular-nums;
}
/* 좌우 여백을 주면 "결과 4 건"처럼 숫자와 단위가 벌어진다. */
.filter-result-count strong { color: var(--primary); }
.notice-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    margin: 14px 0 18px;
}
.notice-sort-chips {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: #f2f4f8;
    border-radius: 8px;
}
.notice-sort-chips button {
    min-height: 32px;
    padding: 0 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-sub);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color 140ms ease, background-color 140ms ease,
        box-shadow 140ms ease, transform 120ms ease;
}
/* 미끄러지는 활성 알약. 버튼 배경 대신 이 하나가 자리를 옮긴다. */
.notice-sort-thumb {
    position: absolute;
    top: 2px;
    left: 0;
    z-index: 0;
    height: calc(100% - 4px);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(20, 43, 88, 0.12);
    pointer-events: none;
    will-change: transform;
}
/* 첫 배치에서는 미끄러지지 않고, 그 다음 전환부터 움직인다. */
.notice-sort-thumb.is-ready {
    transition: transform 260ms cubic-bezier(0.32, 0.72, 0.24, 1),
        width 260ms cubic-bezier(0.32, 0.72, 0.24, 1);
}
.notice-sort-chips button { position: relative; z-index: 1; }
.notice-sort-chips button:hover { color: var(--primary); }
.notice-sort-chips button.active { color: var(--primary-deep); }
@media (prefers-reduced-motion: reduce) {
    .notice-sort-thumb.is-ready { transition: none; }
}
.notice-sort-chips button:active { transform: scale(0.97); }
.notice-sort-chips button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tags .tag.pinned { color: #5b3b00; background: #fff3cc; }
.filter-date-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-date-row input[type="date"] {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 0;
    font-size: 14px; background: #fafafa; outline: none;
}
.filter-date-sep { font-size: 13px; color: var(--text-sub); font-weight: 600; }
.filter-group-wide { grid-column: 1 / -1; }

/* ---------- 공지 그리드 & 카드 ----------
   열 수는 뷰별 CSS가 정한다. 여기에는 카드 자체의 모양만 둔다. */
.grid { display: grid; gap: 20px; }
.grid .card { width: 100%; margin: 0; }
.notice-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: var(--text-sub);
    font-size: 16px;
}
.notice-empty-state strong { display: block; color: var(--text-main); font-size: 17px; }
.notice-empty-state p { margin: 9px 0 18px; font-size: 13px; }
.notice-empty-state.is-error strong { color: #9f2d2d; }
.notice-pagination[hidden],
.filter-result-count[hidden] { display: none !important; }
.notice-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 36px;
}
.notice-pagination button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    color: var(--text-main);
    background: white;
    border: 1px solid var(--border);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.notice-pagination button:hover:not(:disabled),
.notice-pagination button.active { color: white; background: var(--primary); border-color: var(--primary); }
.notice-pagination button:disabled { color: #a1a7b1; background: #f4f5f7; cursor: default; }
.notice-page-numbers { display: flex; gap: 6px; }
.notice-pagination p {
    flex-basis: 100%;
    margin: 0;
    color: var(--text-sub);
    font-size: 13px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
/* 서울대 소식 카드 스타일. 모든 카드는 같은 높이다:
   포스터(사진 또는 큰 제목) → 제목 → 날짜(요일 포함) → 본문 발췌. */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    height: 440px;
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: flex; flex-direction: column;
    contain: layout style;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.18s ease, opacity 0.18s ease;
    transition-delay: var(--notice-enter-delay, 0ms);
}
.card.is-filter-entering {
    opacity: 0;
    transform: translateY(8px);
}
.card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(13, 42, 94, 0.08);
    transform: translateY(-2px);
}
.card.card-expired { background-color: #f7f8fa; }
.card.card-urgent {
    border-color: #c0392b;
    box-shadow: inset 0 0 0 1px #c0392b;
}
.card.is-archived {
    opacity: 0.58;
}
.card.is-archived:hover,
.card.is-archived:focus-within {
    opacity: 0.82;
}

/* 포스터 영역 — 사진이 있으면 사진, 없으면 큰 제목이 여기 온다 */
.card-poster {
    flex: 0 0 216px;
    height: 216px;
    overflow: hidden;
    background: #f4f5f7;
    border-bottom: 1px solid var(--border);
}
.card-img-preview {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
/* 사진 없는 공지: 포스터 자리에 제목을 크게 보여준다 (SNU 텍스트 카드처럼) */
.card-poster.is-text {
    display: flex;
    align-items: center;
    padding: 22px 22px;
    background: linear-gradient(160deg, #f6f8fc 0%, #eef2f9 100%);
}
.card-poster-title {
    margin: 0;
    font-family: 'Pretendard', 'Malgun Gothic', system-ui, sans-serif;
    font-size: 25px;
    line-height: 1.38;
    font-weight: 750;
    letter-spacing: -0.025em;
    color: var(--primary-deep);
    word-break: keep-all;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.card-poster-title-line { display: block; overflow-wrap: anywhere; }
.card-poster-title-line.is-host {
    margin-bottom: 2px;
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.card-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
    background: #f3f4f6; color: #5b6270;
    font-size: 11.5px; padding: 3px 9px; font-weight: 700;
    letter-spacing: -0.2px; font-variant-numeric: tabular-nums;
}
/* 첫 태그는 항상 D-Day(또는 '상시')이므로 네이비로 구분한다. */
.tags .tag:first-child { background: var(--primary-light); color: var(--primary); }
/* 마감 3일 이내면 .d-day가 붙는다. 같은 특이도이므로 뒤에 와서 이긴다. */
.tags .tag.d-day { background: var(--danger-bg); color: var(--danger); }
.tags .tag.expired { background: #e8eaee; color: #59616d; }
.tag.target { background: var(--ok-bg); color: var(--ok); }
/* 리워드 — 조회수와 같은 줄, 바로 왼쪽에 앉는 호박색 칩.
   조회수는 회색이라 두 정보가 색으로 분명히 갈린다. */
.card-reward {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
    padding: 3px 8px;
    color: #8a5a00;
    background: #fdf4e0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.5;
}
.card-reward-icon { flex-shrink: 0; font-size: 10px; }
/* 칩 안에서만 글이 흐르도록 넘치는 부분을 잘라 둔다. */
.card-reward-viewport { min-width: 0; overflow: hidden; }
.card-reward-track { display: flex; width: max-content; }
.card-reward-text {
    /* 이 값은 core.js의 CARD_REWARD_MARQUEE_GAP과 같아야 한다. */
    padding-right: 28px;
    white-space: nowrap;
}
/* 흐르지 않는 짧은 문구는 여백 없이 그대로 보인다. */
.card-reward:not(.is-marquee) .card-reward-text { padding-right: 0; }
.card-reward.is-marquee .card-reward-track {
    /* 3초쯤 멈춰 읽을 시간을 준 뒤 한 방향으로 계속 흐른다. */
    animation: card-reward-marquee var(--marquee-duration, 12s) linear 3s infinite;
}
@keyframes card-reward-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
/* 마우스를 올리면 멈춰 끝까지 읽을 수 있다. */
.card-reward.is-marquee:hover .card-reward-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .card-reward.is-marquee .card-reward-track { animation: none; }
    .card-reward-text { padding-right: 0; }
}

/* 이미지 카드의 제목. 텍스트 카드는 포스터가 제목이므로 이 자리를 비운다. */
.card-title {
    margin: 0; font-size: 16.5px; line-height: 1.45;
    word-break: keep-all; font-weight: 700; color: var(--text-main);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.card-date {
    font-size: 12.5px; color: var(--text-sub); font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.card-excerpt {
    margin: 0;
    font-size: 13px; line-height: 1.6; color: #5b6270;
    word-break: break-word;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.card-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-width: 0;
    font-size: 11.5px; color: var(--text-sub);
    margin-top: auto; padding-top: 8px;
    font-variant-numeric: tabular-nums;
}
/* 리워드 칩은 줄 왼쪽 끝에서 시작하고, 조회수는 오른쪽 끝에 붙어 줄어들지
   않는다. 자리가 모자라면 조회수 대신 칩이 줄어든다. */
.view-count { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

/* 데스크톱 마우스 사용 환경에서만 잠시 머문 공지를 가볍게 펼쳐 보여준다. */
.notice-hover-preview {
    position: fixed;
    z-index: 720;
    max-height: 230px;
    overflow: hidden;
    border: 1px solid #bdc9df;
    background: #fff;
    box-shadow: 0 18px 46px rgba(16, 37, 78, 0.2);
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.notice-hover-preview[hidden] { display: none; }
.notice-hover-preview.visible { opacity: 1; transform: translateY(0); }
body.notice-dragging .notice-hover-preview { display: none !important; }
.notice-hover-preview-body { padding: 14px 16px 15px; }
.notice-hover-preview-label { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.notice-hover-preview h3 {
    margin: 6px 0 7px; overflow: hidden; color: var(--text-main); font-size: 16px; line-height: 1.4;
    text-overflow: ellipsis; white-space: nowrap;
}
.notice-hover-preview-summary-list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
    color: #5b6270;
    font-size: 13px;
    line-height: 1.48;
}
.notice-hover-preview-summary-list li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 모달 ---------- */
.overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 26, 36, 0.45);
    justify-content: center; align-items: center;
    z-index: 1000; padding: 20px; cursor: pointer;
}
.modal {
    background: white; width: 640px; max-width: 100%; max-height: 88vh;
    border: 1px solid var(--border); border-top: 3px solid var(--primary-deep);
    padding: 34px 36px; overflow-y: auto; position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); cursor: default;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.modal h2 { font-family: var(--serif); font-weight: 700; }
.close-btn {
    position: absolute; top: 20px; right: 22px;
    background: white; border: 1px solid var(--border); font-size: 20px;
    cursor: pointer; color: var(--text-sub); z-index: 10;
    width: 34px; height: 34px; border-radius: 0;
    display: flex; align-items: center; justify-content: center; transition: 0.15s;
}
.close-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; color: var(--text-main); }
.form-group label span { color: var(--text-sub); font-weight: normal; font-size: 12.5px; margin-left: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 13px;
    border: 1px solid var(--border); border-radius: 0;
    font-size: 14.5px; background: var(--field-bg); transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-group textarea { height: 180px; resize: vertical; line-height: 1.7; }
.form-row { display: flex; gap: 16px; }
.form-row > div { flex: 1; }

/* ---------- 상세 보기 ---------- */
.ai-box {
    background: var(--primary-light);
    border: 1px solid #d2ddef; border-left: 3px solid var(--primary);
    padding: 20px 22px; margin-bottom: 24px; position: relative;
}
.ai-box h4 { margin: 0 0 12px 0; color: var(--primary-deep); font-size: 15px; font-weight: 700; }
.ai-box ul { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.8; color: #27272a; }

.original-text-box {
    background: #ffffff;
    padding: 22px 24px;
    border: 1px solid var(--border);
    margin-bottom: 26px;
    box-shadow: 0 8px 24px rgba(15, 35, 70, 0.08);
}
.original-text-box h4 { margin: 0 0 12px 0; font-size: 14.5px; color: var(--text-main); font-weight: 700; }
.original-text-content { font-size: 14.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: #111111; }
.original-text-content a { color: var(--primary); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; }
.original-text-content a:hover { border-bottom-color: var(--primary); }

.gallery-container { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 22px; }
.gallery-thumb { flex: 0 0 auto; padding: 0; background: transparent; border: 2px solid transparent; cursor: pointer; }
.gallery-img { display: block; height: 120px; object-fit: cover; border: 1px solid var(--border); transition: opacity 0.15s; }
.gallery-img.active { outline: 2px solid var(--primary); outline-offset: 2px; }
.gallery-img:hover { opacity: 0.85; }
.detail-actions {
    text-align: right; border-top: 1px solid var(--border); padding-top: 24px;
    display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
.detail-actions .btn-spacer { margin-right: auto; }

.loading {
    display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.92);
    align-items: center; justify-content: center; flex-direction: column; z-index: 10;
}
.spinner {
    border: 3px solid var(--border); border-top: 3px solid var(--primary);
    border-radius: 50%; width: 38px; height: 38px;
    animation: spin 0.8s linear infinite; margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 이미지 뷰어 ---------- */
.image-viewer {
    z-index: 2000;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    overflow: hidden;
    cursor: zoom-out;
    background:
        radial-gradient(circle at 50% 45%, rgba(43, 50, 66, 0.72), rgba(7, 10, 17, 0.98) 68%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.image-viewer-toolbar {
    position: relative;
    z-index: 3;
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    color: white;
    background: rgba(7, 10, 17, 0.68);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: default;
}
.image-viewer-counter {
    min-width: 58px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.image-viewer-actions { display: flex; align-items: center; gap: 8px; }
.image-viewer-action,
.image-viewer-close {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.image-viewer-action:hover,
.image-viewer-close:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
.image-viewer-action:active,
.image-viewer-close:active { transform: translateY(1px) scale(0.97); }
.image-viewer-action:focus-visible,
.image-viewer-close:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.image-viewer-close { width: 40px; padding: 0; font-size: 22px; }
.image-viewer-stage {
    position: relative;
    width: 100%;
    min-height: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 80px 32px;
    cursor: default;
    touch-action: pan-y;
}
.image-viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 128px);
    object-fit: contain;
    background: rgba(255,255,255,0.02);
    box-shadow: 0 22px 60px rgba(0,0,0,0.48);
    user-select: none;
}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(12,16,25,0.74);
    color: white;
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 34px;
    width: 48px;
    height: 56px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
    z-index: 2010;
}
.nav-btn:hover { background: rgba(41,82,164,0.9); border-color: rgba(255,255,255,0.35); transform: translateY(-50%) scale(1.04); }
.nav-btn:active { transform: translateY(-50%) scale(0.96); }
.nav-btn:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.nav-btn.left { left: 22px; }
.nav-btn.right { right: 22px; }

/* ---------- 노션식 인라인 블록 비교 ---------- */
.card-block-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transform: translateX(-5px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.card:hover .card-block-controls,
.card:focus-within .card-block-controls {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.card-drag-handle {
    width: 28px;
    height: 32px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #7b818b;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(20, 26, 36, 0.12);
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: grab;
    touch-action: none;
}
.card-drag-handle:hover,
.card-drag-handle:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
    outline: none;
}

.spatial-workspace {
    position: relative;
    min-width: 0;
}
.notice-base-block { min-width: 0; }

/* 공지를 집어 들면 화면 위쪽에 뜨는 놓기 표적.
   화면 한가운데를 가로막지 않으므로 목록 아래쪽 공지를 끌어도 카드가 가려지지 않고,
   스크롤 위치와 무관하게 항상 같은 자리에 있다. 글자는 두지 않고 도형으로만 알린다. */
.split-drop-overlay {
    position: fixed;
    z-index: 1900;
    top: 16px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.33, 1, 0.68, 1);
}
.split-drop-overlay[hidden] { display: none; }
.split-drop-overlay.visible { opacity: 1; transform: translateY(0); pointer-events: none; }
.split-drop-zone {
    display: grid;
    width: 62px;
    height: 48px;
    padding: 0;
    place-items: center;
    color: #5b6577;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #ccd3de;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(19, 42, 86, 0.14);
    backdrop-filter: blur(6px);
    font: inherit;
    cursor: copy;
    pointer-events: auto;
    transition: color 0.14s ease, background-color 0.14s ease,
        border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}
.split-drop-glyph { width: 26px; height: 26px; }
.split-drop-zone.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 22px rgba(29, 72, 153, 0.34);
    transform: translateY(1px) scale(1.06);
}
/* 버리는 표적. 화면 아래 가운데에 따로 떠 담는 표적과 멀찍이 떨어진다. */
.split-trash-overlay {
    position: fixed;
    z-index: 1900;
    right: 0;
    bottom: 22px;
    left: 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.33, 1, 0.68, 1);
}
.split-trash-overlay[hidden] { display: none; }
.split-trash-overlay.visible { opacity: 1; transform: translateY(0); }
.split-drop-zone.is-trash {
    width: auto;
    min-width: 108px;
    height: 52px;
    gap: 8px;
    grid-auto-flow: column;
    padding: 0 18px;
    color: #8a5b55;
    border-radius: 14px;
    pointer-events: auto;
}
.split-trash-label { font-size: 12.5px; font-weight: 800; }
.split-drop-zone.is-trash.active {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 10px 26px rgba(192, 57, 43, 0.36);
}
@media (prefers-reduced-motion: reduce) {
    .split-drop-overlay,
    .split-drop-zone { transition: none; }
}

.compare-space.is-notice-drop-active .compare-col-controls {
    opacity: 0 !important;
    pointer-events: none !important;
}
.compare-empty-slot {
    display: none;
    min-width: 0;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #687180;
    background: #f4f5f7;
    border: 1px dashed #929aa7;
    border-radius: 3px;
    font: inherit;
    cursor: copy;
}
.compare-space.is-notice-drop-active .compare-empty-slot { display: flex; }
.compare-empty-slot span { font-size: 28px; font-weight: 300; line-height: 1; }
.compare-empty-slot strong { font-size: 13px; }
.compare-empty-slot.active {
    color: var(--primary);
    background: #e4eaf5;
    border-color: var(--primary);
}
/* 카드를 통째로 든 분신. 복제는 한 번뿐이고 움직임은 transform만 쓴다. */
.notice-split-drag-overlay {
    position: fixed;
    top: -10000px;
    left: -10000px;
    z-index: 2400;
    width: min(232px, 62vw);
    max-height: 320px;
    padding: 0;
    overflow: hidden;
    color: var(--primary-deep);
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(30, 64, 137, 0.22);
    border-radius: 5px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
    font-size: 14px;
    font-weight: 750;
    will-change: transform;
    /* 분신 안에서는 잘라내기만 하고 다시 배치하지 않는다. */
    contain: layout paint;
    opacity: 0.94;
    pointer-events: none;
}
.notice-split-drag-overlay.is-pointer-overlay {
    top: 0;
    left: 0;
}
/* 분신 안의 포스터와 본문은 카드보다 작게 눌러 담는다. */
.notice-split-drag-overlay .card-poster { height: 132px; margin: 0; }
.notice-split-drag-overlay .card-poster img { width: 100%; height: 100%; object-fit: cover; }
.notice-split-drag-overlay .card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 13px 13px;
}
.notice-split-drag-overlay .card-excerpt,
.notice-split-drag-overlay .card-meta,
.notice-split-drag-overlay .card-block-controls { display: none; }
.notice-split-drag-overlay .card-title {
    font-size: 13.5px;
    -webkit-line-clamp: 2;
}

.spatial-workspace.is-split {
    display: block;
}
.spatial-workspace.is-split .compare-space {
    width: 100%;
    margin: 0 0 26px;
}
.spatial-workspace.is-split .compare-space-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 28px;
    width: 100%;
    padding: 8px 42px 24px;
}
.spatial-workspace.is-split[data-blocks="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "blocks base";
    align-items: start;
    gap: 28px;
}
/* 오른쪽 표적에 놓았으면 공지도 오른쪽에 선다. 영역 이름만 맞바꾸므로
   DOM 순서는 그대로고 탭 순서도 흐트러지지 않는다. */
.spatial-workspace.is-split[data-blocks="1"][data-dock="right"] {
    grid-template-areas: "base blocks";
}
.spatial-workspace.is-split[data-blocks="1"] .compare-space {
    grid-area: blocks;
    margin: 0;
    position: sticky;
    top: 16px;
    align-self: start;
}
.spatial-workspace.is-split[data-blocks="1"] .compare-space-stage {
    display: block;
    padding: 8px 42px 24px;
}
.spatial-workspace.is-split[data-blocks="1"] .notice-base-block {
    grid-area: base;
}
.spatial-workspace.is-split[data-blocks="1"] .notice-base-block > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.spatial-workspace.is-split.is-notice-drop-active[data-blocks="1"] .compare-space {
    grid-column: 1 / -1;
    grid-row: 1;
    z-index: 3;
}
.spatial-workspace.is-split.is-notice-drop-active[data-blocks="1"] .compare-space-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.spatial-workspace.is-split.is-notice-drop-active[data-blocks="1"] .notice-base-block {
    visibility: hidden;
}

.compare-space[hidden] { display: none; }

/* ---------- Notion형 문서 블록 ---------- */
.compare-space {
    position: relative;
    width: min(100%, 1020px);
    margin: 0 auto 30px;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    animation: none;
}
.compare-space-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: 8px 64px 24px;
}
.compare-space-stage[data-layout="columns"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    align-items: start;
}

.compare-col {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 18px 18px 24px;
    overflow: visible;
    color: var(--text-main);
    background: #fff;
    border: 1px solid #e4e8ef;
    box-shadow: 0 10px 28px rgba(20, 43, 88, 0.11);
    transition: opacity 0.12s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.compare-col.is-docked-left { grid-column: 1; }
.compare-col.is-docked-right { grid-column: 2; }
.compare-col:hover,
.compare-col:focus-within {
    background: #fff;
    border-color: #d5ddea;
    box-shadow: 0 14px 34px rgba(20, 43, 88, 0.15);
}
.compare-col:focus { outline: none; }
.compare-col.is-dragging { opacity: 0.28; }
.compare-col.is-drop-before::before,
.compare-col.is-drop-after::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 5;
    height: 2px;
    background: #2f80ed;
    pointer-events: none;
}
.compare-col.is-drop-before::before { top: -2px; }
.compare-col.is-drop-after::after { bottom: 8px; }
.compare-col-controls {
    position: absolute;
    top: 8px;
    left: -44px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transform: translateX(4px);
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.compare-col:hover > .compare-col-controls,
.compare-col:focus-within > .compare-col-controls {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.compare-col-drag-handle {
    display: grid;
    width: 24px;
    height: 28px;
    padding: 0;
    place-items: center;
    color: #9b9a97;
    background: transparent;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    cursor: pointer;
    touch-action: none;
    transition: color 0.12s ease, background-color 0.12s ease;
}
.compare-col-drag-handle { cursor: grab; }
.compare-col-drag-handle:hover,
.compare-col-drag-handle:focus-visible {
    color: #5f5e5b;
    background: rgba(55, 53, 47, 0.08);
    border: 0;
    outline: none;
}
.compare-col-drag-handle:active { cursor: grabbing; }
.compare-col-remove {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 4;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    color: #9b9a97;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    opacity: 1;
    cursor: pointer;
}
.compare-col-remove:hover,
.compare-col-remove:focus-visible { color: var(--danger); background: var(--danger-bg); outline: none; }
.compare-trash-zone {
    display: none;
    grid-column: 1 / -1;
    width: min(100%, 520px);
    min-height: 54px;
    margin: 18px auto 4px;
    padding: 10px 18px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #697386;
    background: #f5f6f8;
    border: 1px dashed #a7afbc;
    border-radius: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}
body.reordering-compare-block .compare-trash-zone {
    display: flex;
    pointer-events: auto;
}
.compare-trash-zone.active {
    color: #a7352a;
    background: #fff0ee;
    border-color: #c94a3d;
}
.compare-col-body {
    display: block;
    min-width: 0;
    max-height: 440px;
    overflow: hidden;
    padding: 0 34px 0 0;
    color: var(--text-main);
    background: transparent;
    border: 0;
    user-select: text;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 48px), transparent 100%);
}
.compare-col.is-expanded .compare-col-body {
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
}
.compare-col-more {
    min-width: 104px;
    height: 38px;
    margin-top: 12px;
    padding: 0 18px;
    color: var(--primary);
    background: #fff;
    border: 1px solid #c9d3e5;
    border-radius: 3px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}
.compare-col-more:hover,
.compare-col-more:focus-visible {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    outline: none;
}
.compare-col-kicker {
    margin: 0 0 5px;
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.compare-col-title {
    margin: 0;
    color: #202124;
    font-size: 23px;
    font-weight: 750;
    line-height: 1.38;
    letter-spacing: -0.025em;
    word-break: keep-all;
}
.compare-col-meta {
    margin-top: 5px;
    color: #8a8f98;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.compare-col-thumb {
    display: block;
    width: auto;
    max-width: min(100%, 560px);
    height: auto;
    max-height: 420px;
    margin: 18px 0;
    object-fit: contain;
    border: 0;
}
.compare-col-label {
    margin: 18px 0 7px;
    color: #37352f;
    font-size: 13px;
    font-weight: 700;
}
.compare-summary-heading,
.ai-box-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.compare-summary-heading > span,
.ai-box-heading > span {
    flex: 0 0 auto;
    color: #8a4b08;
    font-size: 11px;
    font-weight: 800;
}
.ai-box-heading h4 { margin: 0; }
.summary-mismatch-button {
    margin-top: 12px;
    padding: 0;
    color: #5f6b7d;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #bbc3d0;
    text-underline-offset: 3px;
    cursor: pointer;
}
.summary-mismatch-button:hover,
.summary-mismatch-button:focus-visible { color: var(--primary); outline: none; }
.summary-mismatch-button:disabled { cursor: default; opacity: 0.72; }
.compare-col-summary {
    margin: 0;
    padding-left: 22px;
    color: #37352f;
    font-size: 14px;
    line-height: 1.75;
}
.compare-col-summary .is-empty { color: var(--text-sub); }
.compare-col-content {
    max-height: none;
    overflow: visible;
    padding: 0;
    color: #111111;
    background: transparent;
    border: 0;
    font-size: 14px;
    line-height: 1.82;
    white-space: pre-wrap;
    word-break: break-word;
}
.compare-col-content a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.compare-col-open {
    margin-top: 14px;
    padding: 0;
    color: var(--primary);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.compare-col-open:hover,
.compare-col-open:focus-visible { text-decoration: underline; text-underline-offset: 3px; outline: none; }
.compare-drag-overlay {
    position: fixed;
    top: -10000px;
    left: -10000px;
    z-index: 2400;
    width: min(520px, 72vw);
    max-height: 190px;
    padding: 14px 16px;
    overflow: hidden;
    color: var(--text-main);
    background: rgba(255,255,255,0.98);
    border: 0;
    border-radius: 4px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
    opacity: 0.92;
    pointer-events: none;
}
.compare-drag-overlay .compare-col-body { padding: 0; }
.compare-drag-overlay .compare-col-thumb,
.compare-drag-overlay .compare-col-summary,
.compare-drag-overlay .compare-col-content,
.compare-drag-overlay .compare-col-label,
.compare-drag-overlay .compare-col-open { display: none; }
.compare-drag-overlay.is-pointer-overlay { top: 0; left: 0; }

/* ---------- 익명 피드백 모달 ---------- */
.feedback-modal { width: 520px; }
.feedback-modal h2 { font-family: var(--serif); color: var(--primary-deep); }
.feedback-help {
    margin: 4px 0 18px;
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-line;
}
.feedback-modal textarea { line-height: 1.7; }
.feedback-category-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.feedback-category-btn {
    min-height: 42px;
    color: var(--text-sub);
    background: white;
    border: 1px solid var(--border);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.feedback-category-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.feedback-category-btn.active { color: white; background: var(--primary); border-color: var(--primary); }
.feedback-category-btn:active { transform: translateY(1px); }

/* ---------- 문의 모달 ---------- */
.contact-row { gap: 12px; }
.contact-card {
    background: #fafafa; padding: 20px 24px; border: 1px solid var(--border);
    text-align: left; line-height: 1.8; margin-bottom: 24px;
}
.contact-heading {
    text-align: left; margin: 0 0 12px 4px; font-size: 17px; color: var(--primary);
    display: flex; align-items: center; gap: 8px;
}
.contact-divider { height: 1px; background: var(--border); width: 100%; }

/* ---------- 알림 설정 ---------- */
.review-status { min-height: 22px; margin: 12px 0; color: var(--text-sub); font-size: 13px; }
.review-empty { padding: 70px 20px; border: 1px dashed var(--border); color: var(--text-sub); text-align: center; }
.review-eyebrow { margin: 0; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.review-list-meta { display: block; margin-top: 6px; color: var(--text-sub); font-size: 12px; }
.review-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.notification-preferences { width: min(560px, 100%); }
.notification-preferences h2 { margin: 4px 0 8px; font-family: var(--serif); color: var(--primary-deep); }
.notification-help { margin: 0 0 12px; color: var(--text-sub); line-height: 1.6; font-size: 14px; }
.notification-check {
    display: flex; align-items: center; gap: 9px; margin: 12px 0;
    color: var(--text-main); font-size: 14px; font-weight: 650;
}
.notification-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.notification-categories { margin: 14px 0; padding: 14px; border: 1px solid var(--border); }
.notification-categories legend { padding: 0 6px; color: var(--text-main); font-size: 13px; font-weight: 750; }
#notification-category-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#notification-category-list label { display: flex; align-items: center; gap: 7px; font-size: 13px; }

.detail-source-area { margin: 16px 0; padding: 16px; border: 1px solid var(--border); background: #fafafa; }
.detail-source-area h4 { margin: 0 0 10px; }
.detail-source-area a { color: var(--primary); font-weight: 650; }
.detail-source-area ul { margin: 10px 0 0; padding-left: 20px; }

/* ---------- 공지 상세 (모달이 아닌 전체 페이지) ---------- */
.notice-detail-view {
    max-width: 900px;
    margin: 0 auto;
}
@keyframes notice-surface-in {
    from { opacity: 0; transform: translate3d(0, 4px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.surface-entering {
    animation: notice-surface-in 0.16s ease-out;
    will-change: opacity, transform;
}
.detail-back {
    position: sticky;
    top: 12px;
    z-index: 12;
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 0 18px;
    padding: 0;
    place-items: center;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dce3ef;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(20, 43, 88, 0.11);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: color 0.15s ease, background-color 0.15s ease,
        box-shadow 0.15s ease, transform 0.15s ease;
}
.detail-back:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 7px 20px rgba(30, 70, 151, 0.22);
    transform: translateX(-2px);
}
.detail-back:active { transform: translateX(-2px) scale(0.94); }
.detail-back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.notice-detail-view .tags { margin-bottom: 14px; }
.detail-title {
    margin: 0 0 12px; font-family: var(--serif);
    font-size: 32px; line-height: 1.35; font-weight: 800; color: var(--primary-deep);
    word-break: keep-all;
}
.detail-meta {
    margin: 0 0 24px; color: var(--text-sub); font-weight: 500;
    padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.detail-hero { position: relative; margin-bottom: 18px; }
.detail-hero img {
    width: 100%; max-height: 520px; object-fit: contain;
    background: #f4f5f7; border: 1px solid var(--border); display: block;
    /* 사진 자체는 더 이상 클릭 대상이 아니다. 확대는 '크게 보기' 버튼으로만 연다. */
    cursor: default;
}
.detail-image-zoom {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    color: #fff;
    background: rgba(8, 19, 42, 0.72);
    border: 1px solid rgba(255,255,255,0.38);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background-color 0.16s ease, transform 0.16s ease;
}
.detail-image-zoom svg { width: 15px; height: 15px; }
.detail-image-zoom:hover { background: rgba(30, 72, 155, 0.92); transform: translateY(-1px); }
.detail-image-zoom:active { transform: translateY(0) scale(0.97); }
.detail-image-zoom:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.detail-image-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 0;
    transform: translateY(-50%);
    color: white;
    background: rgba(8, 19, 42, 0.72);
    border: 1px solid rgba(255,255,255,0.38);
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.detail-image-nav:hover,
.detail-image-nav:focus-visible { background: rgba(30, 72, 155, 0.92); outline: 2px solid white; }
.detail-image-nav.previous { left: 14px; }
.detail-image-nav.next { right: 14px; }
.detail-image-counter {
    position: absolute;
    /* 오른쪽 아래는 '크게 보기' 버튼 자리이므로 장수 표시는 왼쪽으로 옮긴다. */
    left: 14px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 9px;
    color: white;
    background: rgba(8, 19, 42, 0.72);
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

/* ---------- 폰 미리보기 (모바일 모드) ---------- */
.device-preview {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    /* 뒤 데스크탑 화면을 흐리게 덮는다 */
    background: rgba(9, 20, 43, 0.55);
    backdrop-filter: blur(9px) saturate(0.9);
    -webkit-backdrop-filter: blur(9px) saturate(0.9);
    padding: 24px;
}
/* display:flex 가 [hidden]의 display:none 을 이기므로, 숨김을 명시적으로 되살린다.
   이게 없으면 로드 즉시 빈 폰이 떠서 닫히지 않는다. */
.device-preview[hidden] { display: none !important; }
.device-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.device-frame {
    position: relative;
    width: 390px; height: min(844px, 88vh);
    background: #0b0b0d;
    border-radius: 46px;
    padding: 14px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.45), 0 0 0 2px rgba(255,255,255,0.06) inset;
}
.device-notch {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    width: 150px; height: 26px; background: #0b0b0d;
    border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; z-index: 2;
}
.device-frame iframe {
    width: 100%; height: 100%; border: 0;
    border-radius: 32px; background: white; display: block;
}
.device-close { background: white; color: var(--primary-deep); border-color: white; }
.device-close:hover { background: var(--primary-light); }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
