:root {
    --primary: #3D95AD;
    --primary-contrast: #357D92;
    --primary-dark: #2a6475;
    --primary-light: #4a95ab;
    --accent: #C4A77D;
    --accent-light: #F5EFE6;
    --text: #010101;
    --text-light: #444444;
    --text-muted: #666666;
    --bg: #f8f9fb;
    --bg-light: #ffffff;
    --bg-dark: #f1f3f2;
    --border: #d0d0d0;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
    --info: #17a2b8;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 4px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 60px;
}

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

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: 'Pretendard', sans-serif;
    font-weight: 800;
    font-size: 1.55rem;
    color: #000000;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-links-expanded {
    display: flex;
    gap: 24px;
}

.nav-links-collapsed {
    display: none;
}

@media (max-width: 1220px) {
    .nav-links-expanded {
        display: none;
    }

    .nav-links-collapsed {
        display: block;
    }
}

.nav-link {
    color: var(--text);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0;
    color: var(--text);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
    display: none;
    z-index: 200;
    margin-top: 8px;
}

.nav-dropdown.show {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    font-size: 0.9rem;
}

.nav-dropdown a:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-primary-contrast {
    background: var(--primary-contrast);
    color: var(--white);
}

.btn-primary-contrast:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--white);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

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

.notification-wrapper,
.user-menu-wrapper {
    position: relative;
}

.notification-btn,
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    border-radius: var(--radius);
}

.notification-btn:hover,
.user-menu-btn:hover {
    background: var(--bg-light);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 모바일용 알림 버튼 - 기본적으로 숨김 */
.mobile-notification-btn {
    display: none;
    position: relative;
    padding: 6px 10px;
    color: var(--text);
    border-radius: var(--radius);
}

.mobile-notification-btn:hover {
    background: var(--bg-light);
}

/* 태블릿용 프로필 링크 - 기본적으로 숨김 */
.tablet-profile-link {
    display: none;
    padding: 6px 10px;
    border-radius: var(--radius);
}

.tablet-profile-link:hover {
    background: var(--bg-light);
}

/* 태블릿용 검색 버튼 - 기본적으로 숨김 */
.tablet-search-btn {
    display: none;
    padding: 6px 10px;
    color: var(--text);
    border-radius: var(--radius);
}

.tablet-search-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-nickname {
    font-size: 0.9rem;
}

.notification-dropdown,
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 280px;
    display: none;
    z-index: 200;
}

.notification-dropdown.show,
.user-dropdown.show {
    display: block;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-dark);
    color: var(--text);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: var(--bg-light);
}

.notification-dropdown .notification-message {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.notification-dropdown .notification-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-footer {
    display: block;
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
}

.user-dropdown a:hover {
    background: var(--bg-light);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-left: auto;
}

.header-search-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.9rem;
    width: 140px;
    outline: none;
}

.header-search-input:focus {
    background: var(--white);
}

.header-search-btn {
    background: transparent;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.header-search-btn:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text);
}

.main {
    min-height: calc(100vh - 140px);
    padding: 32px 0;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-success {
    background: #d4edda;
    color: #155724;
}

.flash-danger {
    background: #f8d7da;
    color: #721c24;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
}

.flash-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
}

.flash-close:hover {
    opacity: 1;
}

.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.home-layout {
    display: flex;
    gap: 24px;
    overflow: hidden;
}

.home-main {
    flex: 1;
    min-width: 0;
}

.home-sidebar {
    width: 280px;
    flex-shrink: 0;
}

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

.category-full {
    grid-column: 1 / -1;
}

.quick-write {
    margin-top: 24px;
    text-align: center;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title a {
    color: inherit;
}

.section-title a:hover {
    color: var(--primary);
}

.more-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.post-list-compact {
    list-style: none;
    min-width: 0;
}

.post-list-compact li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-dark);
    min-width: 0;
    overflow: hidden;
}

.post-list-compact li:last-child {
    border-bottom: none;
}

.post-list-compact a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    min-width: 0;
}

.post-list-compact .post-title {
    flex: 1;
    display: inline-flex;
    align-items: baseline;
    max-width: 100%;
    min-width: 0;
    margin-right: 16px;
}

.post-list-compact .post-title .title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.post-list-compact .post-title .comment-count {
    flex-shrink: 0;
}

.post-list-compact .post-title .badge {
    flex-shrink: 0;
}

.post-list-compact .post-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-count {
    color: var(--primary-contrast);
    font-weight: 500;
    margin-left: 4px;
    vertical-align: top;
}

.notice-section {
    background: #E3F2FD;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.notice-list a {
    color: var(--text);
}

.notice-badge {
    background: var(--primary-contrast);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius);
    margin-right: 8px;
}

.notice-list time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.notice-more {
    text-align: right;
    margin-top: 8px;
}

.notice-more a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.notice-more a:hover {
    color: var(--primary);
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.sidebar-buttons .btn {
    font-size: 1rem;
}

.sidebar-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.sidebar-user {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    display: block;
    padding: 12px 16px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.sidebar-btn:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
    color: var(--primary);
}

.sidebar-btn.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.sidebar-btn.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.sidebar-menu {
    padding: 16px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.sidebar-nav-link:hover {
    background: var(--bg);
    color: var(--primary);
}

.sidebar-nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-promo {
    padding: 0;
    border: none;
    background: transparent;
    position: relative;
}

.promo-label {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.65rem;
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 6px;
    border-radius: 3px;
    text-decoration: none;
    z-index: 10;
}

.promo-label:hover {
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
}

.home-bottom-promo,
.content-promo {
    position: relative;
}

.ad-placeholder {
    background: var(--bg-dark);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ad-placeholder-wide {
    padding: 30px 20px;
}

.home-bottom-promo {
    margin-top: 24px;
}

.home-bottom-promo img,
.sidebar-promo img,
.content-promo img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.content-promo {
    margin: 24px 0;
}

.popular-list {
    list-style: none;
    counter-reset: popular;
}

.popular-list li {
    counter-increment: popular;
    padding: 8px 0;
}

.popular-list a {
    display: flex;
    align-items: center;
    color: var(--text);
}

.popular-list .rank {
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.popular-list li:nth-child(-n+3) .rank {
    background: var(--primary);
    color: var(--white);
}

.popular-list .title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content-layout {
    display: flex;
    gap: 24px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.content-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.board-page {
    max-width: none;
}

.board-header {
    margin-bottom: 24px;
}

.board-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.board-description {
    color: var(--text-muted);
    margin-top: 4px;
}

.board-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-tabs,
.subcategory-tabs {
    display: flex;
    gap: 8px;
}

.category-tab,
.subcategory-tab {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
}

.category-tab.active,
.category-tab:hover,
.subcategory-tab.active,
.subcategory-tab:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.board-search {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.board-search-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.board-search-input {
    flex: 1;
}


.post-table {
    width: 100%;
    border-collapse: collapse;
}

.post-table th,
.post-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.post-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
}

.th-title { width: auto; }
.th-category { width: 100px; }
.th-author { width: 100px; }
.th-date { width: 80px; }
.th-views { width: 60px; text-align: center; }
.th-likes { width: 60px; text-align: center; }

.td-title {
    max-width: 0;
}
.td-title-inner {
    display: flex;
    align-items: baseline;
    min-width: 0;
}
.td-category { font-size: 0.85rem; color: var(--text-muted); }
.td-author { font-size: 0.9rem; }
.td-date { font-size: 0.85rem; color: var(--text-muted); }
.td-views { text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.td-likes { text-align: center; font-size: 0.85rem; color: var(--text-muted); }

.td-meta-mobile {
    display: none;
}

.notification-badge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    margin-left: 4px;
}

.post-title-link {
    color: var(--text);
    display: inline-flex;
    align-items: baseline;
    max-width: 100%;
    min-width: 0;
}

.post-title-link:hover {
    color: var(--primary);
}

.post-title-link .title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.post-title-link .comment-count {
    flex-shrink: 0;
}

.notice-row {
    background: var(--bg-light);
}

.badge-notice {
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--radius);
    margin-right: 6px;
}

.comment-count {
    color: var(--primary-contrast);
    font-size: 0.85rem;
    margin-left: 4px;
}

.tag-list {
    display: inline;
    margin-left: 8px;
}

.tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.tag:hover {
    color: var(--primary);
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
}

.page-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: var(--text-muted);
}

.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.post-category {
    margin-bottom: 8px;
}

.post-category a {
    font-size: 0.9rem;
    color: var(--primary);
}

.post-subcategory {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.post-subcategory::before {
    content: "›";
    margin-right: 8px;
}

.post-detail .post-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.post-detail .post-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-tags {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tags .tag {
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.post-content {
    min-height: 200px;
    margin-bottom: 32px;
    line-height: 1.8;
    font-size: 16px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.post-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--radius);
}

.post-content pre {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
}

.post-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre code {
    background: transparent;
    padding: 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 10px 15px 10px 25px;
    margin: 16px 0;
    background: #eee;
    color: #1c1c1c;
}

.post-content h1 {
    margin-top: 3rem;
    margin-bottom: 1em;
}

.post-content h2 {
    margin-top: 2.7rem;
    margin-bottom: 1em;
}

.post-content h3 {
    margin-top: 2.3rem;
    margin-bottom: 1em;
}

.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1em;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin: 1em 0;
}

.post-content ul,
.post-content ol {
    padding-left: 1em;
}

.post-content ul li p,
.post-content ol li p {
    margin-bottom: 0;
}

.post-content p + ul,
.post-content p + ol {
    margin-top: 0;
}

.post-content p a {
    word-break: break-all;
}

/* 테이블 스타일 */
.post-content .table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #555 #eee;
    margin: 1em 0;
}

.post-content table {
    width: 100%;
    border: 2px solid var(--primary);
    border-collapse: collapse;
    white-space: nowrap;
}

.post-content table th {
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
}

.post-content table td {
    padding: 5px 10px;
    border-right: 1px solid var(--primary);
    border-bottom: 1px solid var(--border);
}

.post-content table tr:nth-child(2n) {
    background-color: var(--bg-light);
}

.post-content table tr:nth-child(2n-1) {
    background-color: var(--white);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.post-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-light);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--bg-dark);
}

.action-btn.active {
    background: var(--primary);
    color: var(--white);
}

.action-btn.active svg {
    fill: currentColor;
}

.post-manage {
    display: flex;
    gap: 8px;
}

.inline-form {
    display: inline;
}

.post-nav {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-nav-link {
    flex: 1;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.post-nav-link.next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.nav-title {
    color: var(--text);
    font-size: 0.95rem;
}

.post-nav-list {
    margin-top: 16px;
    text-align: center;
}

.btn-list {
    min-width: 120px;
}

.comments-section {
    margin-top: 40px;
}

.comments-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.comments-count {
    color: var(--primary);
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-form textarea {
    flex: 1;
    min-height: 80px;
    resize: vertical;
}

.login-prompt {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-muted);
}

.comment {
    padding: 20px 0;
}

.comment-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.comment-content {
    line-height: 1.7;
}

.deleted-comment {
    color: var(--text-muted);
    font-style: italic;
}

.comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 12px;
}

.comment-actions button {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
}

.comment-actions button:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.reply-form {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.reply-form textarea {
    margin-bottom: 8px;
}

.replies {
    margin-left: 0;
    margin-top: 20px;
}

.reply {
    padding: 20px 0 20px 20px;
    border-left: 6px solid var(--primary);
    border-bottom: 1px solid var(--primary);
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* 주변 글 목록 섹션 */
.nearby-posts-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.nearby-posts-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.nearby-posts-section .post-table {
    margin-bottom: 16px;
}

.nearby-posts-section .current-post {
    background: var(--accent-light);
}

.nearby-posts-section .current-post .post-title-link {
    font-weight: 600;
    color: var(--primary);
}

.nearby-posts-more {
    text-align: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 16px;
}

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

.auth-page {
    max-width: 400px;
    margin: 40px auto;
}

.auth-card {
    background: var(--white);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
}

.auth-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resend-verification-box {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
    text-align: center;
}

.resend-verification-box p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-links a {
    margin-left: 4px;
}

.auth-links .divider {
    margin: 0 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    display: block;
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

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

.form-check-input {
    width: 16px;
    height: 16px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.write-page,
.mypage,
.search-page,
.notification-page,
.admin-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header .page-title {
    margin-bottom: 0;
}

.page-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.toolbar-btn {
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
}

.toolbar-btn:hover {
    background: var(--bg-dark);
}

.editor-textarea {
    border-radius: 0 0 var(--radius) var(--radius);
}

.editor-preview {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 300px;
}

.mypage-header {
    margin-bottom: 32px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.profile-nickname {
    font-size: 1.25rem;
    font-weight: 600;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-bio {
    margin-top: 8px;
    color: var(--text-light);
}

.mypage-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 4px;
}

.mypage-menu {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius);
}

.menu-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 20px;
}

.menu-title:first-child {
    margin-top: 0;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    padding: 8px 0;
}

.menu-list a {
    color: var(--text);
}

.menu-list a:hover {
    color: var(--primary);
}

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

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-form {
    max-width: 500px;
}

.profile-image-form {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-image-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.hidden-input {
    display: none;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.warning-box h3 {
    color: #856404;
    margin-bottom: 8px;
}

.warning-box ul {
    margin-left: 20px;
    color: #856404;
}

.comment-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.comment-content-preview {
    margin-bottom: 8px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-form {
    margin-bottom: 24px;
}

.search-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
}

.search-filters {
    display: flex;
    gap: 8px;
}

.search-filters select {
    width: auto;
}

.popular-tags {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.tags-label {
    font-weight: 600;
    margin-right: 12px;
}

.popular-tags .tag {
    margin-right: 8px;
}

.popular-tags .tag.active {
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.notification-list-page .notification-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    padding-right: 40px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.notification-list-page .notification-item.unread {
    background: #e8f4ea;
}

.notification-list-page .delete-form {
    position: absolute;
    top: 12px;
    right: 12px;
    margin-left: 0;
}

.notification-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    color: var(--text);
}

.notification-type {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.notification-message {
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.delete-form {
    margin-left: 12px;
}

.delete-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.delete-btn:hover {
    color: var(--danger);
}

.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stats-grid .stat-card.warning {
    background: #fff3cd;
}

.stats-grid .stat-link {
    display: block;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 8px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.admin-section {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius);
}

.admin-section h2 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.admin-list {
    list-style: none;
}

.admin-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-dark);
    font-size: 0.9rem;
}

.admin-list li:last-child {
    border-bottom: none;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-table td {
    font-size: 0.9rem;
}

.td-details {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-tabs a {
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    color: var(--text);
}

.filter-tabs a:hover,
.filter-tabs a.active {
    background: var(--primary);
    color: var(--white);
}

.filter-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-form select {
    width: auto;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending { background: #ffc107; color: #856404; }
.status-processed { background: #28a745; color: white; }
.status-dismissed { background: #6c757d; color: white; }
.status-restored { background: #17a2b8; color: white; }
.status-active { background: #28a745; color: white; }
.status-inactive { background: #6c757d; color: white; }
.status-banned { background: #dc3545; color: white; }

.admin-form {
    max-width: 600px;
}

.badge {
    display: inline-block;
    width: 3.5rem;
    text-align: center;
    padding: 1px 0;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 4px;
    flex-shrink: 0;
}

.badge:not(:has(+ .badge)) {
    margin-right: 8px;
}

.badge-sub {
    background: #86dac7;
    color: #1a4a3f;
}

.badge-category {
    background: var(--primary-contrast);
    color: #fff;
}

.post-detail .badge {
    width: auto;
    padding: 5px 10px;
    vertical-align: middle;
}

.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.error-message {
    font-size: 1.5rem;
    margin: 16px 0;
}

.error-description {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.static-page {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.static-page h1 {
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.static-page h2 {
    font-size: 1.25rem;
    margin: 24px 0 12px;
}

.static-page ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.static-page p {
    margin: 1em 0;
}

.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

@media (max-width: 1220px) {
    .home-layout,
    .content-layout {
        flex-direction: column;
    }

    .home-sidebar,
    .content-sidebar {
        width: 100%;
    }

    .home-sidebar {
        display: flex;
        flex-direction: row;
        gap: 24px;
    }

    .sidebar-main {
        flex: 1;
        min-width: 0;
    }

    .sidebar-extras {
        display: flex;
        flex: 2;
        gap: 20px;
    }

    .sidebar-extras .sidebar-promo {
        flex: 1;
        margin-bottom: 0;
    }
}

/* 슬라이드 메뉴 오버레이 */
.slide-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slide-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 슬라이드 메뉴 */
.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--white);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.slide-menu.show {
    transform: translateX(0);
}

.slide-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.slide-menu-welcome {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slide-menu-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.slide-menu-greeting {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.slide-menu-login-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-contrast);
}

.slide-menu-login-link:hover {
    color: var(--primary-dark);
}

.slide-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    border-radius: var(--radius);
    transition: background 0.2s;
}

.slide-menu-close:hover {
    background: var(--bg-light);
}

.slide-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.slide-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text);
    font-size: 0.95rem;
    transition: background 0.2s;
}

.slide-menu-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.slide-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    margin-left: auto;
}

.slide-menu-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--bg-dark);
}

.slide-menu-section-title {
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slide-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.slide-menu-buttons .btn-primary {
    background: var(--primary-contrast);
}

.slide-menu-buttons .btn-primary:hover {
    background: var(--primary-dark);
}

/* 슬라이드 메뉴 열릴 때 body 스크롤 방지 */
body.menu-open {
    overflow: hidden;
}

/* 태블릿 환경 (1220px ~ 780px) */
@media (max-width: 1220px) and (min-width: 781px) {
    /* 햄버거 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: flex;
    }

    /* 헤더 검색창 숨기기 */
    .header-search {
        display: none;
    }

    /* nav-actions 오른쪽 정렬 */
    .nav-actions {
        margin-left: auto;
    }

    /* 태블릿용 검색 버튼 표시 */
    .tablet-search-btn {
        display: flex;
        align-items: center;
    }

    /* 사이드바 버튼 숨기기 */
    .sidebar-buttons {
        display: none;
    }

    /* PC용 프로필 드롭다운 숨기기 */
    .user-menu-wrapper {
        display: none;
    }

    /* 태블릿용 프로필 링크 숨기기 */
    .tablet-profile-link {
        display: none;
    }

    /* 태블릿에서 알림 버튼 표시 */
    .mobile-notification-btn {
        display: flex;
        align-items: center;
    }

    /* 태블릿에서 알림 드롭다운 숨기기 */
    .notification-wrapper {
        display: none;
    }

    /* 사이드바 가로 배열: [게시판 목록][인기글][광고] */
    .content-sidebar {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
        margin-top: 24px;
    }

    .content-sidebar .sidebar-section {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .content-sidebar .sidebar-menu {
        flex: 1;
    }

    .content-sidebar .sidebar-popular {
        flex: 1;
    }

    .content-sidebar .sidebar-promo {
        flex: 1;
    }
}

@media (max-width: 780px) {
    .board-all .badge-sub,
    [data-category="all"] .badge-sub {
        display: none;
    }

    .EasyMDEContainer .editor-toolbar {
        flex-wrap: wrap;
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav-link.next {
        text-align: left;
    }

    .btn-list {
        width: 100%;
    }

    .notice-list li {
        display: block;
    }

    .notice-list a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notice-list time {
        display: none;
    }

    .container {
        padding: 0 15px;
    }

    .header .container {
        padding: 0;
    }

    .nav {
        height: 48px;
        padding: 0 10px;
    }

    .nav-actions {
        gap: 0;
    }

    .notification-wrapper {
        display: none;
    }

    .user-menu-wrapper {
        display: none;
    }

    .tablet-profile-link {
        display: none;
    }

    .tablet-search-btn {
        display: none;
    }

    .mobile-notification-btn {
        display: flex;
        align-items: center;
    }

    .logo-img {
        height: 34px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    /* 게시판 액션 영역 - 모바일 */
    .board-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .subcategory-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 8px;
        padding-bottom: 4px;
    }

    .subcategory-tabs::-webkit-scrollbar {
        display: none;
    }

    .subcategory-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .board-actions .btn-primary {
        width: 100%;
    }

    /* 게시글 테이블 - 모바일 */
    .post-table thead {
        display: none;
    }

    .post-table {
        display: block;
        width: 100%;
        border: none;
    }

    .post-table tbody {
        display: block;
    }

    .post-table tr {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 50px;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
    }

    .post-table tr:first-child {
        border-top: 1px solid var(--border);
    }

    .post-table td {
        border: none;
        padding: 0;
    }

    .post-table .td-title {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        font-size: 0.93rem;
        line-height: 1.4;
        max-width: 100%;
        min-width: 0;
    }

    .post-table .td-title .badge {
        flex-shrink: 0;
    }

    .post-table .td-title .post-title-link {
        flex: 1;
        min-width: 0;
    }

    .post-table .td-title .td-meta-mobile {
        width: 100%;
    }

    .post-table .td-author,
    .post-table .td-date,
    .post-table .td-views,
    .post-table .td-likes,
    .post-table .td-category {
        display: none;
    }

    .td-meta-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        margin-top: 4px;
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .td-meta-mobile span:not(:last-child)::after {
        content: "·";
        margin: 0 6px;
    }

    .td-meta-mobile .meta-author {
        font-size: 0.7rem;
    }

    /* 모바일에서 행 전체 클릭 가능 */
    .post-table tr {
        position: relative;
    }

    .post-title-link::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .post-table tr:hover {
        background: var(--bg-light);
    }

    .home-sidebar,
    .content-sidebar {
        margin-top: 24px;
    }

    .home-sidebar {
        flex-direction: column;
    }

    .sidebar-extras {
        flex-direction: column;
    }

    .sidebar-extras .sidebar-promo {
        width: 100%;
    }

    .sidebar-buttons {
        display: none;
    }

    .sidebar-menu {
        display: none;
    }

    .nav {
        justify-content: space-between;
    }

    /* 모바일에서 nav-menu 숨김 (슬라이드 메뉴 사용) */
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-search {
        display: none;
    }

    .home-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .board-search-form {
        flex-direction: column;
    }

    .sidebar-buttons {
        flex-direction: column;
    }

    .category-full {
        grid-column: 1;
    }

    .mypage-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .post-table {
        display: block;
        overflow-x: auto;
    }

    .form-row {
        flex-direction: column;
    }

    .post-footer {
        flex-direction: column;
        gap: 16px;
    }

    .post-manage {
        width: 100%;
        justify-content: flex-end;
    }

    .search-filters {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 310px) {
    .logo-text {
        display: none;
    }
}

/* iOS 에디터 툴바 */
.ios-editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.ios-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.ios-toolbar-btn:hover {
    background: var(--bg-hover);
}

.ios-toolbar-btn:active {
    background: var(--bg-secondary);
}

.ios-editor-toolbar + textarea {
    border-radius: 0 0 var(--radius) var(--radius);
}
