/*
 * Refit ONM 관리자 사이트 스타일. 단일 파일로 관리한다.
 *
 * 방식: 백엔드 중심.
 *   - 표/폼은 bare HTML 엘리먼트를 직접 스타일링한다. 템플릿에 클래스를 붙이지 않는다.
 *   - 클래스는 엘리먼트만으로 표현이 안 되는 것(레이아웃/배지/카드)에만 쓴다.
 *   - 쓰지 않는 컴포넌트를 미리 만들지 않는다. 화면이 필요할 때 추가한다.
 *
 * 색/타이포 초기값은 Refit 프론트(Refit-4th-Frontend/src/styles)에서 참고했다.
 * 이후 ONM이 독립적으로 관리한다. 프론트를 따라 갱신할 의무는 없다.
 * 단 --brand는 로고 SVG(refit-wordmark.svg)에 하드코딩된 #7E57FF와 일치해야 한다.
 *
 * 타입 스케일(프론트 typography.ts 기준): 24 / 20 / 18 / 16 / 15 / 14 / 12 px
 * 관리자 화면은 긴 라벨과 숫자를 안정적으로 읽어야 하므로 letter-spacing은 0으로 둔다.
 */

:root {
    /* 브랜드 */
    --brand: #7E57FF;
    --brand-hover: #6B4AE6;
    --brand-pressed: #583DCC;
    --brand-text: #583DCC;
    --brand-deep: #4530B3;
    --brand-light: #F2EEFF;
    --brand-border: #CBBCFF;
    --brand-focus: #E5DDFF;

    /* 텍스트 */
    --text: #1A1A1E;
    --text-sub: #595966;
    --text-faint: #D1D1D8;
    --text-invert: #FFFFFF;

    /* 배경 / 선 */
    --bg: #FFFFFF;
    --bg-page: #F8F8FA;
    --line: #E2E2E9;

    /* 상태 */
    --danger-text: #B73739;
    --danger-light: #FFF1F0;
    --danger-border: #FFB8B3;

    /* 형태 */
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow: 0px 4px 6px 0px rgba(43, 43, 51, 0.07);
    --tracking: 0;
    --font-sans: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

@font-face {
    font-family: "Pretendard Variable";
    src: url("/fonts/PretendardVariable.woff2") format("woff2-variations");
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   Base
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    letter-spacing: var(--tracking);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    letter-spacing: inherit;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ============================================================
   표 / 폼 — 엘리먼트 직접 스타일링.
   목록·상세 화면 템플릿은 클래스 없이 데이터 구조만 쓴다.
   ============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

caption {
    text-align: left;
    padding-bottom: 8px;
    font-size: 0.75rem;
    color: var(--text-sub);
}

th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
    background: var(--bg-page);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

tbody tr:hover td {
    background: var(--bg-page);
}

/* 숫자·ID 열은 오른쪽 정렬이 읽기 쉽다. <td class="num"> */
th.num, td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    letter-spacing: var(--tracking);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input[type="file"] {
    width: 100%;
    padding: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-sub);
    background: var(--bg-page);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

input::placeholder {
    color: var(--text-faint);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-focus);
}

/* ============================================================
   Layout — 웹사이트 형식. 상단 내비 + 문서형 스크롤 + 푸터.
   웹앱 셸(고정 사이드바 + 내부 스크롤)이 아니다.
   ============================================================ */

/* 짧은 페이지에서도 푸터가 화면 아래에 붙도록. 긴 페이지는 그대로 흐른다. */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site .page {
    flex: 1 0 auto;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.brand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand__logo {
    height: 18px;
    width: auto;
    display: block;
}

.brand__suffix {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sub);
    letter-spacing: 0;
}

.brand-bar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.admin-chip:hover .admin-chip__name {
    color: var(--brand-text);
}

.admin-chip__name {
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-chip__email {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.nav-bar {
    border-top: 1px solid var(--line);
    background: var(--bg);
}

/*
 * 드롭다운 내비게이션.
 *
 * 상위는 대시보드 + 그룹 3개로 고정이라, 하위 메뉴가 늘어나도 이 줄은 길어지지 않는다.
 * <details>/<summary> 기반이라 JS 없이도 열고 닫힌다(nav.js는 편의 기능만 보강).
 *
 * 주의: .nav 에 overflow 를 걸면 드롭다운이 잘린다.
 */
.nav {
    display: flex;
    align-items: stretch;
    gap: 2px;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 12px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-sub);
    white-space: nowrap;
    /* 활성 표시는 밑줄, hover 는 배경. 두 상태가 섞이지 않도록 서로 다른 채널을 쓴다. */
    border-bottom: 2px solid transparent;
    transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.nav__link:hover {
    color: var(--text);
    background: var(--bg-page);
}

/* 그룹 안에 현재 화면이 있으면 그룹 제목에도 활성 표시가 남는다. */
.nav__link--active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}

.nav__menu {
    position: relative;
}

.nav__summary {
    cursor: pointer;
    list-style: none;
}

/* 기본 삼각형 마커 제거 — 아래에서 직접 그린다. */
.nav__summary::-webkit-details-marker {
    display: none;
}

/* 펼침 방향을 알려주는 caret. 열리면 뒤집힌다. */
.nav__summary::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.55;
    transition: transform 0.12s ease;
}

.nav__menu[open] > .nav__summary::after {
    transform: rotate(180deg);
}

.nav__menu[open] > .nav__summary {
    color: var(--text);
    background: var(--bg-page);
}

.nav__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    min-width: 172px;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.nav__dropdown-link {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-sub);
    white-space: nowrap;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.nav__dropdown-link:hover {
    color: var(--text);
    background: var(--bg-page);
}

.nav__dropdown-link--active {
    color: var(--brand);
    background: var(--brand-light);
    font-weight: 600;
}

.page {
    padding: 32px 0 64px;
}

.page__head {
    margin-bottom: 20px;
}

.page__title {
    font-size: 1.5rem;
    font-weight: 700;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-page);
    padding: 20px 0;
}

.site-footer__text {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* ============================================================
   Card / 상세 정보
   ============================================================ */

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
}

.card__body {
    padding: 20px;
}

/* 표를 카드 안에 넣을 때는 카드 패딩을 없앤다. */
.card__body--table {
    padding: 0;
}

.card__body--table table tr:last-child td {
    border-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.info-item__label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
}

.info-item__value {
    font-size: 0.9375rem;
    font-weight: 500;
    word-break: break-all;
}

/* ============================================================
   Dashboard metrics
   ============================================================ */

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 12px;
}

.metric-card {
    min-height: 112px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.metric-card__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-sub);
}

.metric-card__value {
    display: block;
    margin-top: 10px;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.metric-card__meta {
    display: block;
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
}

.metric-card--brand {
    border-color: var(--brand-border);
    background: var(--brand-light);
}

.metric-card--brand .metric-card__value {
    color: var(--brand-text);
}

.metric-card--warning {
    border-color: #FFE2A8;
    background: #FFF8E8;
}

.metric-card--warning .metric-card__value {
    color: #8C5A00;
}

.metric-card--danger {
    border-color: var(--danger-border);
    background: var(--danger-light);
}

.metric-card--danger .metric-card__value {
    color: var(--danger-text);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.panel {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 0;
}

.panel__title {
    font-size: 1rem;
    font-weight: 700;
}

.panel__caption {
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--text-sub);
}

.chart-box {
    height: 280px;
    padding: 18px;
}

/* 값이 전부 0일 때 canvas 대신 표시된다(dashboard.js). */
.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
    font-size: 0.875rem;
    color: var(--text-faint);
}

.chart-box--donut {
    height: 300px;
}

.table-wrap {
    padding: 14px 18px 18px;
    overflow-x: auto;
}

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--text-faint);
}

.status-dot--brand {
    background: var(--brand);
}

.status-dot--warning {
    background: #F2A900;
}

.status-dot--danger {
    background: var(--danger-text);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 280px;
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.empty-state__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand-text);
    font-size: 0.75rem;
    font-weight: 600;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 700;
}

.empty-state__body {
    color: var(--text-sub);
}

/* ============================================================
   Badge / Button / Alert / Notice
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge--brand {
    background: var(--brand-light);
    color: var(--brand-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn--primary {
    background: var(--brand);
    color: var(--text-invert);
}

.btn--primary:hover {
    background: var(--brand-hover);
}

.btn--primary:active {
    background: var(--brand-pressed);
}

.btn--ghost {
    background: var(--bg);
    border-color: var(--line);
    color: var(--text-sub);
}

.btn--ghost:hover {
    background: var(--bg-page);
    color: var(--text);
}

.btn--block {
    width: 100%;
}

.alert {
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.alert--error {
    background: var(--danger-light);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
}

.alert--info {
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
    color: var(--brand-deep);
}

.notice {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--brand-light);
    border: 1px solid var(--brand-border);
    color: var(--brand-deep);
}

.notice__title {
    font-weight: 600;
    margin-bottom: 2px;
}

.notice__body {
    opacity: 0.85;
}

/* ============================================================
   Forms
   ============================================================ */

.form-card {
    max-width: 640px;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field__hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-sub);
}

.field__error {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--danger-text);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* ============================================================
   Login — 공통 레이아웃이 없는 단독 페이지
   ============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-page);
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.login-card__brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.login-card__logo {
    height: 19px;
    width: auto;
    display: block;
}

.login-card__suffix {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sub);
    letter-spacing: 0;
}

.login-card__subtitle {
    margin-bottom: 28px;
    font-size: 0.875rem;
    color: var(--text-sub);
}

.login-card .alert {
    margin-bottom: 20px;
}

.login-card .field {
    margin-bottom: 16px;
}

.login-card__submit {
    margin-top: 8px;
    padding: 11px 14px;
    font-size: 0.9375rem;
}

@media (max-width: 720px) {
    .container {
        padding: 0 16px;
    }

    .page {
        padding: 24px 0 48px;
    }

    .brand-bar {
        min-height: 64px;
        height: auto;
        gap: 8px;
    }

    .brand-bar__right {
        gap: 6px;
        min-width: 0;
    }

    .brand-bar__right > .badge,
    .admin-chip__email {
        display: none;
    }

    .brand-bar__right .btn {
        padding: 8px 10px;
        white-space: nowrap;
    }

    .card__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .card__header .text-caption-muted {
        max-width: 100%;
        line-height: 1.5;
    }

    .nav {
        gap: 10px 0;
    }

    .nav__group {
        width: 100%;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-bottom: 10px;
    }

    .nav__group:last-child {
        border-bottom: 0;
    }

    .nav__group-title {
        padding: 10px 0 2px;
    }

    /* 우측 끝 메뉴의 드롭다운이 모바일 화면 밖으로 나가지 않게 안쪽으로 연다. */
    .nav__menu:last-child .nav__dropdown {
        right: 0;
        left: auto;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .chart-box,
    .chart-box--donut {
        height: 260px;
    }
}

/* ============================================================
   목록 화면 — 검색 필터 / 표 / 페이지네이션
   ============================================================ */

.filters {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.filters__grid {
    display: grid;
    /* 조건이 늘어도 줄만 늘어나도록. 화면 폭에 따라 열 수가 자동으로 바뀐다. */
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px 16px;
}

.filters__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.filters .field {
    margin: 0;
}

/* 표 안의 ID 링크. 행 전체를 링크로 만들면 텍스트 선택이 불편해서 ID만 링크로 둔다. */
.link {
    color: var(--brand);
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

.empty-result {
    padding: 28px 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-sub);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination__summary {
    font-size: 0.8125rem;
    color: var(--text-sub);
}

.pagination__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-sub);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

a.pagination__link:hover {
    color: var(--text);
    background: var(--bg-page);
}

.pagination__link--current {
    color: var(--text-invert);
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 600;
}

a.pagination__link--current:hover {
    color: var(--text-invert);
    background: var(--brand-hover);
}

.pagination__link--disabled {
    color: var(--text-faint);
    cursor: default;
}

/* ============================================================
   유틸 / 배지 변형
   ============================================================ */

.badge--muted {
    background: var(--bg-page);
    color: var(--text-sub);
}

.badge--danger {
    background: var(--danger-light);
    color: var(--danger-text);
}

.stack-16 > * + * {
    margin-top: 16px;
}

.text-caption-muted {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* ============================================================
   작품·공간 등록 / 사진 관리
   ============================================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.field--wide {
    grid-column: 1 / -1;
}

.field textarea {
    width: 100%;
    resize: vertical;
}

.field small {
    color: var(--danger-text);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-manager,
.content-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.image-manage-item,
.content-gallery figure {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.image-manage-item img,
.content-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: var(--radius);
    background: var(--bg-page);
}

.image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 8px;
    padding: 12px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-sub);
    background: var(--bg-page);
    border-radius: var(--radius);
}

.image-thumb {
    display: block;
    width: 72px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-page);
}

.btn--danger {
    color: var(--text-invert);
    background: var(--danger-text);
    border-color: var(--danger-text);
}

.btn--danger:hover {
    filter: brightness(0.92);
}

.image-review {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.image-review__preview {
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 16px;
    background: #111111;
    border-radius: var(--radius-lg);
}

.image-review__preview img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.image-review__panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg);
}

.section-title {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
}

.review-meta > div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.review-meta dt {
    font-size: 0.8125rem;
    color: var(--text-sub);
}

.review-meta dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.reference-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reference-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-manage-item__meta,
.content-gallery figcaption {
    display: block;
    overflow-wrap: anywhere;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: var(--text-sub);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .image-review {
        grid-template-columns: 1fr;
    }

    .image-review__preview {
        min-height: 260px;
    }
}

/* ============================================================
   공개 차단 섹션 (작품/공간 상세)
   ============================================================ */

.block-help {
    margin-bottom: 14px;
    line-height: 1.6;
}

.block-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* 사유 입력이 버튼보다 넓게 차지하도록. */
.block-form .field {
    flex: 1 1 320px;
    margin: 0;
}

.block-info {
    margin-bottom: 16px;
}

/* 이미지 상세의 공개 차단 블록. 되돌릴 수 있는 조치라 삭제 폼과 시각적으로 구분한다. */
.moderation-block {
    padding: 18px 20px;
    margin-bottom: 16px;
    background: var(--bg-page);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.moderation-block__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.moderation-block__title {
    font-size: 0.9375rem;
    font-weight: 600;
}
