/* styles.css — 깔끔하게 정리한 버전 (디자인 유지) */
:root {
    --bg: #121212;
    --surface: #1e1e1e;
    --muted: #aaa;
    --accent: #ff7a00;
    --accent-dark: #e06000;
    --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --gap: 12px;
    --max-width: 1100px;
    --text: #f0f0f0;
    --card-pad: 16px;
    font-family:
        "Noto Sans KR",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
}

/* Reset */
* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.35;
    font-size: 14px;
}

/* 데스크탑 기본: 모바일 메뉴/햄버거는 숨김 */
.mobile-menu-wrap {
    display: none;
}

.hamburger,
.icon-btn.hamburger {
    display: none;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.brand {
    display: flex;
    gap: 8px;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}
.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}
.brand-text {
    font-weight: 700;
    font-size: 16px;
}

/* buttons */
.icon-btn {
    background: transparent;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.icon-btn:active {
    transform: translateY(1px);
}
.add-btn {
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    color: #fff;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255, 122, 0, 0.25);
}

/* search */
.search-box {
    flex: 1;
}
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--accent);
    padding: 4px;
    border-radius: 999px;
    max-width: 820px;
}
.search-form input[type="search"] {
    flex: 1;
    border: 0;
    padding: 10px 12px;
    border-radius: 999px;
    outline: none;
    background: #222;
    color: #fff;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.search-form input[type="search"]:focus {
    border-color: var(--accent);
    background: #2b2b2b;
}
.search-form .search-btn {
    background: transparent;
    border-radius: 999px;
    padding: 8px 10px;
}

/* category chips */
.category-bar {
    margin-top: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        rgba(12, 12, 12, 0.38);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}
.category-list {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    max-width: var(--max-width);
    margin: 0 auto;
    list-style: none;
    overflow-x: auto;
}
.category-list::-webkit-scrollbar {
    height: 6px;
}
.category-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}
.chip {
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.72);
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}
.chip:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}
.chip.active {
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 10px 22px rgba(255, 122, 0, 0.2);
    border-color: transparent;
}

/* container/hero/listings */
.container {
    max-width: var(--max-width);
    margin: 18px auto;
    padding: 0 12px 48px;
}
.hero {
    margin-bottom: 10px;
    background:
        radial-gradient(circle at top right, rgba(255, 122, 0, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(255, 122, 0, 0.14), rgba(255, 122, 0, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    display: grid;
    gap: 16px;
}
.hero-kicker {
    margin: 0 0 8px;
    color: rgba(255, 216, 179, 0.9);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero-text {
    margin: 0;
    font-weight: 800;
    color: var(--accent);
    font-size: 26px;
    line-height: 1.24;
}
.hero-subtext {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.6;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.hero-stat {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(17, 17, 17, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    margin-bottom: 6px;
}
.hero-stat-value {
    font-size: 22px;
    line-height: 1;
    color: #fff;
}
.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hero-note {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
}

.listings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

/* card */
.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease;
}
.card:focus,
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* 썸네일 박스를 카드 좌우로 '패딩 무시'하고 꽉 채우기 + 중앙 정렬 */
.card .thumb {
    position: relative;
    /* 카드 padding을 무시하고 양 옆으로 박스 확장 */
    width: calc(100% + (var(--card-pad) * 2));
    margin-left: calc(-1 * var(--card-pad));
    margin-right: calc(-1 * var(--card-pad));
    /* 상단도 카드 패딩만큼 말아 올려 헤더가 딱 붙도록 */
    margin-top: calc(-1 * var(--card-pad));

    height: 200px; /* 필요시 180~220px 등으로 조절 */
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background: #151515; /* 이미지가 없을 때 배경 */
    box-sizing: border-box;
}

/* 이미지: 좌우여백 없이 꽉 차게 + 중앙 기준 크롭 */
.card .thumb img {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 */
    width: 100%;
    height: 100% !important; /* height:auto가 있으면 덮어쓰기 */
    object-fit: cover; /* 꽉 채우면서 비율 유지 */
    object-position: center; /* 중앙 기준 */
    display: block; /* 이미지 아래 미세한 빈칸 방지 */
    margin: 0;
    border-radius: 0; /* 둥근 모서리는 래퍼(.thumb)에만 */
}

/* 카드 썸네일: 여백 없이 꽉 차게 + 중앙 정렬 */
.thumb {
    position: relative;
    width: 100%;
    /* 고정 높이 또는 비율 중 택1 — 현재 디자인 유지하려면 고정 높이가 간단 */
    height: 180px; /* 필요하면 200~220px로 조절 */
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background-color: #151515;
}

.thumb img {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; 같은 의미 */
    width: 100%;
    height: 100% !important; /* height:auto를 덮어쓰기 위해 !important */
    object-fit: cover; /* 가로/세로 비율 유지하며 꽉 채우기 */
    object-position: center; /* 중앙 정렬 */
    display: block; /* 이미지 아래 여백 방지 */
    margin: 0;
    border-radius: 0; /* 둥근 모서리는 래퍼(.thumb)에만 적용 */
}
.card:hover .thumb img {
    transform: scale(1.03);
}

.card-body {
    padding: 14px 14px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-time {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    white-space: nowrap;
}
.title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 122, 0, 0.14);
    border: 1px solid rgba(255, 122, 0, 0.24);
    color: #ffd8b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.card-tag--soft {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
}

.card-meta {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta-label {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 700;
}

.card-meta-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline .control {
    flex: 1 1 180px;
}

/* auth area (single unified definition) */
#authArea {
    position: absolute !important; /* fixed -> absolute (부모 .top-inner 기준) */
    top: 50% !important; /* 부모 높이의 중앙 */
    right: 12px !important; /* 우측 여백 (원하면 숫자 조정) */
    transform: translateY(-50%) !important; /* 정확한 수직 중앙 맞춤 */
    z-index: 1000 !important;
    /* 기존 시각 느낌 유지하되 검은 버블은 이미 제거했다면 아래는 안전값 */
    background: rgba(18, 18, 18, 0) !important; /* 투명으로 두려면 0.0, 아주 연하게 유지하려면 0.06 등 */
    padding: 0 6px !important; /* topbar 내부 여백에 맞게 줄임 */
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: none !important; /* 컨테이너 그림자 제거 */
}

/* login button (remove button-specific shadow but keep chip appearance) */
#loginBtn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 500;
    font-size: 14px;
    transition:
        background 0.2s,
        color 0.2s,
        border 0.2s;
    box-shadow: none !important;
    filter: none !important; /* remove the extra dark halo */
}
#loginBtn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* avatar */
#userAvatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}
#userAvatar:hover {
    transform: scale(1.06);
}

/* profile menu (fixed, one definition) */
#profileMenu {
    position: fixed;
    top: 64px;
    right: 20px;
    width: 180px;
    z-index: 1001;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: fadeIn 0.15s ease;
}
#profileMenu.hidden {
    display: none;
}
#profileMenu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
#profileMenu li {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s;
}
#profileMenu li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#profileMenu li:hover {
    background: var(--accent);
    color: #fff;
}

/* small helpers & forms (keep original look for register page) */
.page-heading {
    margin: 0 0 0 12px;
    font-size: 16px;
    color: #cfcfcf;
    font-weight: 600;
}
.container--narrow {
    max-width: 760px;
}
.form-card {
    padding: 16px;
    gap: 12px;
}
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-group--full {
        grid-column: 1 / -1;
    }
}
.label-title {
    color: #e8e8e8;
    font-size: 13px;
    font-weight: 600;
}
.input,
.select,
.textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #1a1a1a;
    color: #eee;
    transition:
        border 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}
.textarea {
    resize: vertical;
    min-height: 110px;
}
.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #222;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

/* file drop preview */
.file-drop {
    display: block;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: #bbb;
    cursor: pointer;
    transition:
        border 0.2s,
        background 0.2s,
        color 0.2s;
}
.file-drop:hover {
    border-color: var(--accent);
    background: #1a1a1a;
    color: #fff;
}
.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.preview img {
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* form actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 2px;
}
.chip--ghost {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--text);
}

/* accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    z-index: 9999;
    width: auto;
    height: auto;
}

/* responsive */
@media (min-width: 760px) {
    .top-inner {
        padding: 16px;
    }
    .search-form input[type="search"] {
        font-size: 16px;
    }
    .listings {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    .brand-text {
        font-size: 18px;
    }
}
@media (min-width: 1100px) {
    .listings {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* small fade */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------
   QUICK FIX (맨 아래에 추가)
   - 등록 버튼(.add-btn) 그림자 제거
   - 로그인 영역(#authArea) 배경·그림자 제거 (버튼 주변 검은색 제거)
   - 로그인 버튼 자체(#loginBtn) 스타일 정리(외형 유지)
   -------------------------- */

/* (1) 등록 버튼(주황 연필) 그림자 제거 */
.add-btn {
    box-shadow: none !important;
    /* 필요하면 아래 줄로 hover 그림자도 제거 */
    transition: transform 0.12s ease !important;
}

/* (2) auth 컨테이너의 배경/그림자 제거 — 로그인 버튼 주변 검은 버블 사라짐 */
#authArea {
    background: transparent !important; /* 검은 반투명 배경 비활성화 */
    box-shadow: none !important; /* 컨테이너 그림자 제거 */
    padding: 6px 8px !important; /* 레이아웃 유지용 최소 패딩 */
}

/* (3) 로그인 버튼 자체는 기존 모양 유지하되 내부 그림자/필터 제거 */
#loginBtn {
    background: var(--surface) !important; /* 기존 버튼 배경 유지 */
    box-shadow: none !important; /* 버튼 그림자 완전 제거 */
    filter: none !important; /* filter로 준 glow 제거 대비 */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
}

/* (선택) avatar도 그림자 제거 (로그인 후 프로필도 동일하게) */
#userAvatar {
    box-shadow: none !important;
}

/* profile menu anchor: 링크 기본색 제거, 전체 영역을 클릭 가능하게 */
#profileMenu li a {
    display: block; /* li 전체 영역을 클릭 가능하게 */
    width: 100%;
    color: inherit; /* 부모 li의 색을 따르게 함 (보라/파랑 제거) */
    text-decoration: none; /* 밑줄 제거 */
    padding: 0; /* li에 이미 패딩 있으므로 추가 여백 제거 */
    line-height: inherit;
}

/* 방문/활성 상태도 부모 색을 따르도록 강제 */
#profileMenu li a:link,
#profileMenu li a:visited,
#profileMenu li a:hover,
#profileMenu li a:active,
#profileMenu li a:focus {
    color: inherit;
    text-decoration: none;
}

/* (선택) 링크 포커스 시 아웃라인을 보기 좋게 */
#profileMenu li a:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* 기존 li:hover에 이미 accent 배경이 적용되어 있으므로 그대로 사용.
   단, a 내부 텍스트 색상도 hover에 맞춰 변하도록 위에서 처리함. */

/* ─────────────────────────────────────────────
   글 등록 카드 내부 전용 보강 (사이트 톤 유지)
   ───────────────────────────────────────────── */
.register-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 22px 22px 18px;
    border-radius: 20px;
}

.page-heading {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--text-strong, #eaeaea);
}

.form-grid {
    display: grid;
    gap: 12px;
}

.register-form-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
}

.register-section {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.register-section--media,
.register-actions {
    grid-column: 1 / -1;
}

.register-section-head {
    margin-bottom: 16px;
}

.register-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.register-section-text {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.5;
}

.register-fields {
    display: grid;
    gap: 14px;
}

.register-fields--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-row .col-12 {
    grid-column: 1 / -1;
}

@media (max-width: 820px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.label {
    font-size: 12px;
    color: #c6ccd3;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.req {
    color: #ff7a00;
    font-weight: 700;
}

.control {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #2e2f32;
    background: #1f2123;
    color: #e7e7e7;
    outline: none;
    transition:
        border 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}
.control:focus {
    border-color: #ff7a00;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}
textarea.control {
    padding: 10px 12px;
    height: auto;
    resize: vertical;
    min-height: 132px;
}

.date-field {
    display: grid;
    gap: 12px;
}

.date-type-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.date-input {
    max-width: 240px;
}

.file-drop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed #3a3a3a;
    color: #cfcfcf;
    cursor: pointer;
    user-select: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}
.file-drop:hover {
    background: #222427;
    border-color: #606060;
    color: #fff;
}

.preview {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.preview img {
    width: 148px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.register-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 2px 0;
}

.btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #323232;
    background: #222427;
    color: #e6e6e6;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.02s ease;
}
.btn:hover {
    background: #26282b;
    border-color: #444;
}
.btn:active {
    transform: translateY(1px);
}
.btn.primary {
    background: #ff7a00;
    color: #111;
    border-color: #ff7a00;
}
.btn.primary:hover {
    background: #ff8d23;
    border-color: #ff8d23;
}

.hint {
    font-size: 12px;
    color: #9da3aa;
}

/* 상단바에서 등록 페이지의 빈 검색박스 균형용 */
.search-box--empty {
    width: clamp(120px, 35vw, 560px);
}

/* home header cleanup */
.topbar--home {
    background:
        linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(18, 18, 18, 0.9)),
        rgba(18, 18, 18, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.top-inner--home {
    padding: 12px 16px;
    gap: 16px;
}

.topbar--home .header-start,
.topbar--home .header-actions {
    display: flex;
    align-items: center;
}

.topbar--home .header-start {
    flex: 0 0 auto;
    gap: 10px;
    min-width: 110px;
}

.topbar--home .brand {
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar--home .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 122, 0, 0.95), rgba(200, 89, 0, 0.95));
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 20px rgba(255, 122, 0, 0.2);
}

.topbar--home .brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar--home .brand-text {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.topbar--home .brand-sub {
    color: rgba(255, 255, 255, 0.46);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar--home .search-box--home {
    flex: 1 1 auto;
    min-width: 0;
}

.topbar--home .search-form {
    max-width: none;
    padding: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar--home .search-form input[type="search"] {
    background: rgba(255, 255, 255, 0.03);
    border-color: transparent;
    padding: 11px 14px;
}

.topbar--home .search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.topbar--home .search-form input[type="search"]:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 122, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.14);
}

.topbar--home .search-form .search-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    box-shadow: 0 8px 16px rgba(255, 122, 0, 0.2);
}

.topbar--home .header-actions {
    flex: 0 0 auto;
    gap: 10px;
    margin-left: auto;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar--home #authArea {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    padding: 0 !important;
    gap: 8px !important;
}

.topbar--home #loginBtn {
    min-height: 42px;
    padding: 0 16px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    font-weight: 600;
}

.topbar--home #loginBtn:hover {
    background: rgba(255, 122, 0, 0.16) !important;
}

.topbar--home #userAvatar {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.topbar--home .quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar--home .quick-action-btn {
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
}

.topbar--home .quick-action-btn:hover {
    background: rgba(255, 122, 0, 0.14);
    border-color: rgba(255, 122, 0, 0.35);
}

.topbar--home #profileMenu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
}

.topbar--subpage {
    background:
        linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(18, 18, 18, 0.9)),
        rgba(18, 18, 18, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.top-inner--subpage {
    padding: 12px 16px;
    gap: 14px;
}

.topbar--subpage .brand {
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar--subpage .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 122, 0, 0.95), rgba(200, 89, 0, 0.95));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.topbar--subpage .brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.topbar--subpage .brand-text {
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.04em;
}

.topbar--subpage .brand-sub {
    color: rgba(255, 255, 255, 0.44);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar--subpage #authArea {
    padding: 0 4px !important;
}

.topbar--subpage #loginBtn {
    min-height: 40px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .topbar--home .top-inner--home {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
    }

    .topbar--home .header-start {
        min-width: auto;
        gap: 6px;
    }

    .topbar--home .brand {
        padding: 4px 8px 4px 4px;
        border-radius: 14px;
    }

    .topbar--home .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 14px;
    }

    .topbar--home .brand-copy {
        gap: 0;
    }

    .topbar--home .brand-sub {
        display: none;
    }

    .topbar--subpage .top-inner--subpage {
        padding: 0 12px;
        height: 56px;
    }

    .topbar--subpage .brand-sub {
        display: none;
    }

    .topbar--home .header-actions {
        gap: 8px;
    }

    .topbar--home .quick-actions {
        padding-left: 0;
        border-left: 0;
    }

    .topbar--home #authArea {
        margin-left: auto;
    }

    .topbar--home #loginBtn {
        min-height: 36px;
        padding: 0 12px !important;
        font-size: 13px;
    }

    .topbar--home #profileMenu {
        position: fixed;
        top: 60px;
        right: 12px;
    }
}

/* 글 등록 카드만 컨테이너 전체폭으로 */
.register-card {
    width: 100%;
    max-width: none; /* 카드 공통 max-width가 있다면 무시 */
}

.toggle-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: #ccc;
}

.toggle-box input[type="checkbox"] {
    accent-color: #ff7a00;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ====== 글 등록 카드: 한글 줄바꿈/쪼개짐 방지 ====== */
/* 카드 전체에 ‘한글은 단어 단위로’, ‘가능하면 한 줄에’ */
.register-card,
.register-card * {
    word-break: keep-all; /* break-all을 덮어쓰기 */
}

.register-card .seg span,
.register-card .btn,
.register-card .chip,
.register-card .label {
    white-space: nowrap; /* '습득', '분실', '등록', '취소'가 줄바꿈되지 않도록 */
}

/* 라디오 토글(습득/분실) 레이아웃 강화 */
.register-card .seg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: var(--layer-2);
    cursor: pointer;
}

/* 버튼이 세로로 찌그러지지 않도록 */
.register-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 36px;
    padding: 0 12px;
}

/* 상태 배지 */
.status-badge {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #eee;
}

.register-card .seg input {
    accent-color: var(--accent);
}
.status-badge.is-holding {
    background: rgba(30, 150, 110, 0.15);
    border-color: rgba(30, 150, 110, 0.35);
}
.status-badge.is-finding {
    background: rgba(255, 122, 0, 0.15);
    border-color: rgba(255, 122, 0, 0.35);
}
.status-badge.is-done {
    background: rgba(120, 120, 120, 0.15);
    border-color: rgba(120, 120, 120, 0.35);
    color: #cfcfcf;
}
/* ----- modal ----- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}
.modal-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* 폭을 조금 줄여서 덜 넓게 보이게 */
    width: min(92vw, 680px);
    max-height: 86vh;
    overflow: visible;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 넓은 화면에서도 과도하게 넓어지지 않도록 보수적으로 */
@media (min-width: 1100px) {
    .modal-panel {
        width: 700px;
    }
}
.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.92);
    color: #f2f2f2;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    z-index: 2;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease;
}

.modal-close:hover {
    background: rgba(255, 122, 0, 0.18);
    border-color: rgba(255, 122, 0, 0.3);
    transform: translateY(-1px);
}
.modal-body {
    display: grid;
    gap: 14px;
    max-height: calc(86vh - 34px);
    overflow-y: auto;
    padding-right: 4px;
    padding-top: 18px;
    scrollbar-width: none;
}
.modal-body::-webkit-scrollbar {
    display: none;
}
/* 컨테이너는 화면 높이에 따라 유연, 너무 작지도 크지도 않게 */
.modal-thumb {
    margin: 0;
    height: clamp(200px, 46vh, 360px);
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .modal-panel {
        width: min(94vw, 680px);
        max-height: 88vh;
        padding: 14px 14px 16px;
        border-radius: 16px;
    }

    .modal-close {
        right: 10px;
        top: 10px;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .modal-body {
        max-height: calc(88vh - 28px);
        padding-top: 16px;
        gap: 12px;
    }
}

/* 이미지 전체가 보이도록 contain 사용 */
.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 큰 세로/가로 사진 모두 중앙 정렬 */
    display: block;
}
.modal-title {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
}
.modal-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 600;
}

.modal-meta-chip--muted {
    color: rgba(255, 255, 255, 0.58);
}
.modal-desc {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
    white-space: pre-wrap;
}
.msg-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.msg-actions {
    display: flex;
    justify-content: flex-end;
}

.msg-box .textarea {
    flex: 1;
}
.owner-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* inbox list */
.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.inbox-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #1a1a1a;
}
.inbox-item .meta {
    color: #aaa;
    font-size: 12px;
    margin: 0;
}
.inbox-item .title {
    margin: 0 0 4px;
    font-weight: 600;
}

/* header inbox badge (작고 톤 다운) */
#inboxBtn {
    position: relative;
}
.badge {
    position: absolute;
    right: -2px;
    top: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d24;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.msg-opt {
    display: flex;
    gap: 8px;
    align-items: center;
}
.seg-radio {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: #1a1a1a;
}
.seg-radio input {
    accent-color: var(--accent);
}
.inbox-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
/* 쪽지 답장 영역 – 세로 정렬로 깔끔하게 */
.inbox-reply {
    display: flex;
    flex-direction: column; /* 가로 → 세로로 변경 */
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
}
.inbox-reply .textarea {
    width: 100%;
    min-height: 90px;
    box-sizing: border-box;
}
/* 답장 보내기 버튼은 우측 정렬 느낌 */
.inbox-reply button,
.inbox-reply .chip {
    align-self: flex-end;
}

/* final inbox layout override */
.inbox-modal-panel {
    width: min(92vw, 760px);
}

.inbox-modal-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-modal-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.5;
}

.inbox-empty {
    padding: 28px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.inbox-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    align-items: flex-start;
    position: relative;
}

.inbox-thumb-wrap {
    width: 108px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inbox-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbox-item .content {
    position: relative;
    min-width: 0;
    padding-bottom: 0;
}

.inbox-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.inbox-item .title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #fff;
}

.inbox-time {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    white-space: nowrap;
}

.inbox-sender-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inbox-sender {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 600;
}

.sender-verified-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.15);
    color: #63d471;
    font-size: 11px;
    font-weight: 700;
}

.inbox-status-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    margin-left: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
}

.auth-state--done {
    color: #8bd4ff;
}

.inbox-message {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: keep-all;
}

.inbox-actions,
.auth-verify,
.handover-actions {
    position: static;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.btn-delete-message {
    background: rgba(255, 90, 90, 0.12);
    border-color: rgba(255, 90, 90, 0.22);
    color: #ffb0b0;
}

.auth-answer-area,
.inbox-reply {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.auth-answer-area .textarea,
.inbox-reply .textarea {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
}

.auth-answer-area .chip,
.inbox-reply .chip {
    align-self: flex-end;
}

@media (max-width: 768px) {
    .inbox-modal-panel {
        width: min(94vw, 760px);
    }

    .inbox-item {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .inbox-thumb-wrap {
        width: 100%;
        height: 152px;
    }

    .inbox-card-head {
        flex-direction: column;
        gap: 6px;
    }

    .inbox-time {
        white-space: normal;
    }

    .inbox-actions,
    .auth-verify,
    .handover-actions {
        justify-content: stretch;
    }

    .inbox-actions .chip,
    .auth-verify .chip,
    .handover-actions .chip,
    .inbox-reply .chip,
    .auth-answer-area .chip {
        width: 100%;
        justify-content: center;
    }
}

/* inbox refresh */
.inbox-modal-panel {
    width: min(92vw, 760px);
}

.inbox-modal-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-modal-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.5;
}

.inbox-empty {
    padding: 28px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.inbox-list {
    gap: 14px;
}

.inbox-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.inbox-thumb-wrap {
    width: 108px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inbox-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbox-item .content {
    min-width: 0;
}

.inbox-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.inbox-item .title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #fff;
}

.inbox-time {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    white-space: nowrap;
}

.inbox-sender-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inbox-sender {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 600;
}

.sender-verified-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.15);
    color: #63d471;
    font-size: 11px;
    font-weight: 700;
}

.inbox-status-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    margin-left: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
}

.auth-state--done {
    color: #8bd4ff;
}

.inbox-message {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: keep-all;
}

.inbox-actions,
.auth-verify,
.handover-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.btn-delete-message {
    background: rgba(255, 90, 90, 0.12);
    border-color: rgba(255, 90, 90, 0.22);
    color: #ffb0b0;
}

.auth-answer-area,
.inbox-reply {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-answer-area .textarea,
.inbox-reply .textarea {
    min-height: 96px;
}

@media (max-width: 768px) {
    .inbox-modal-panel {
        width: min(94vw, 760px);
    }

    .inbox-item {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .inbox-thumb-wrap {
        width: 100%;
        height: 152px;
    }

    .inbox-card-head {
        flex-direction: column;
        gap: 6px;
    }

    .inbox-time {
        white-space: normal;
    }

    .inbox-actions,
    .auth-verify,
    .handover-actions {
        justify-content: stretch;
    }

    .inbox-actions .chip,
    .auth-verify .chip,
    .handover-actions .chip,
    .inbox-reply .chip,
    .auth-answer-area .chip {
        width: 100%;
        justify-content: center;
    }
}

/* 인박스 카드: 버튼을 카드 우하단 고정 */
.inbox-item {
    position: relative;
}
.inbox-item .content {
    position: relative;
    padding-bottom: 44px;
} /* 버튼 자리 확보 */
.inbox-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
}

/* 인증/요청 박스 */
.auth-actions {
    margin-top: 2px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-title {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.auth-actions .auth-help {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.6;
}

.auth-actions small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    line-height: 1.5;
}

.auth-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.auth-submit-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
}

/* ───────── 인증 Q/A 뱃지 ───────── */
.badge-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-auth--question {
    background: rgba(255, 200, 80, 0.12);
    color: #ffcf6b;
}

.badge-auth--answer {
    background: rgba(102, 204, 255, 0.12);
    color: #8bd4ff;
}

/* 인증 상태 텍스트 (대기/승인/거절) */
.auth-state {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
}

.auth-state--pending {
    color: #ffb347;
}

.auth-state--accepted {
    color: #7ddc84;
}

.auth-state--rejected {
    color: #ff7a7a;
}

/* 승인/거절 버튼 줄 */
.auth-verify {
    margin-top: 4px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* ===========================
   인박스 레이아웃 정리 (버튼 겹침 방지)
   =========================== */

.inbox-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #1a1a1a;
    align-items: flex-start;
    position: relative; /* 카드 자체는 그대로 */
}

.inbox-item .content {
    position: relative;
    padding-bottom: 0; /* 예전 absolute 버튼용 여유 공간 제거 */
}

.inbox-actions {
    position: static; /* 우하단 고정 해제 */
    margin-top: 8px;
    display: flex;
    gap: 8px;
    justify-content: flex-end; /* 오른쪽 정렬만 유지 */
}

.inbox-reply {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.inbox-reply .textarea {
    min-height: 70px;
}

/* 인증 승인/거절 버튼 줄 */
.auth-verify {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* 전달 완료 버튼 줄 */
.handover-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

/* 전달 완료 상태 텍스트(있으면) */
.handover-state {
    margin-left: 4px;
    font-size: 11px;
    color: #8bd4ff;
}

/* 인증 답변 입력 영역 */
.auth-answer-area {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-answer-area .textarea {
    min-height: 90px;
}

.auth-answer-area .btn-auth-answer-send {
    align-self: flex-end;
}

/* 메인 목록 상태별 섹션 헤더 */
.list-section-header {
    grid-column: 1 / -1; /* 그리드 전체 가로 폭 차지 */
    margin: 18px 0 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
}

.list-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #ddd;
    letter-spacing: 0.01em;
}

/* ===========================
   인박스: 답장 영역은 항상 아래로
   =========================== */

/* 카드 전체는 2열 그리드: [썸네일][내용] + 아래 한 줄 전체가 답장 */
.inbox-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 8px;
    align-items: flex-start;
}

/* 답장 영역을 항상 새 줄 + 전체 폭 차지 */
.inbox-reply {
    grid-column: 1 / -1; /* 두 컬럼 전체 span */
    margin-top: 4px;
    display: flex;
    flex-direction: column; /* textarea 위, 버튼 아래 */
    align-items: stretch;
    gap: 6px;
}

/* 답장 textarea는 카드 폭 100% */
.inbox-reply .textarea {
    width: 100%;
    min-height: 90px;
    box-sizing: border-box;
}

/* 보내기 버튼은 오른쪽 정렬 느낌 */
.inbox-reply button,
.inbox-reply .chip {
    align-self: flex-end;
}

/* final inbox layout override */
.inbox-modal-panel {
    width: min(92vw, 760px);
}

.inbox-modal-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-modal-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.5;
}

.inbox-empty {
    padding: 28px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.inbox-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    align-items: flex-start;
    position: relative;
}

.inbox-thumb-wrap {
    width: 108px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inbox-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbox-item .content {
    position: relative;
    min-width: 0;
    padding-bottom: 0;
}

.inbox-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.inbox-item .title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #fff;
}

.inbox-time {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    white-space: nowrap;
}

.inbox-sender-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inbox-sender {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 600;
}

.sender-verified-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.15);
    color: #63d471;
    font-size: 11px;
    font-weight: 700;
}

.inbox-status-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    margin-left: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
}

.auth-state--done {
    color: #8bd4ff;
}

.inbox-message {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: keep-all;
}

.inbox-actions,
.auth-verify,
.handover-actions {
    position: static;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.btn-delete-message {
    background: rgba(255, 90, 90, 0.12);
    border-color: rgba(255, 90, 90, 0.22);
    color: #ffb0b0;
}

.auth-answer-area,
.inbox-reply {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.auth-answer-area .textarea,
.inbox-reply .textarea {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
}

.auth-answer-area .chip,
.inbox-reply .chip {
    align-self: flex-end;
}

@media (max-width: 768px) {
    .inbox-modal-panel {
        width: min(94vw, 760px);
    }

    .inbox-item {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .inbox-thumb-wrap {
        width: 100%;
        height: 152px;
    }

    .inbox-card-head {
        flex-direction: column;
        gap: 6px;
    }

    .inbox-time {
        white-space: normal;
    }

    .inbox-actions,
    .auth-verify,
    .handover-actions {
        justify-content: stretch;
    }

    .inbox-actions .chip,
    .auth-verify .chip,
    .handover-actions .chip,
    .inbox-reply .chip,
    .auth-answer-area .chip {
        width: 100%;
        justify-content: center;
    }
}
