/* ???? ??? ??? */

/* ============================================
   ???? CSS ??
   ============================================ */
:root {
    /* ?? ?? */
    --bg-primary: #edeef0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --bg-hover: #f3f4f6;
    --bg-code: #f5f5f5;

    /* ??? ?? */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-muted: #757575;
    --text-link: #0066cc;
    --text-link-hover: #0052a3;

    /* ??? ?? */
    --border-primary: #e8e8e8;
    --border-secondary: #dee2e6;
    --border-hover: #0096ff;

    /* ?? ?? */
    --btn-primary-bg: #0096ff;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #0078cc;
    --btn-secondary-bg: #6c757d;
    --btn-secondary-text: #ffffff;
    --btn-secondary-hover: #5a6268;

    /* ?? ?? */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;

    /* ??/??? */
    --vote-up-bg: #e8f5e9;
    --vote-up-text: #2e7d32;
    --vote-down-bg: #ffebee;
    --vote-down-text: #c62828;

    /* ?? ?? (???) */
    --btn-like-bg: #dc3545;
    --btn-like-border: #c82333;
    --btn-like-hover: #bd2130;

    /* ??? */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* ?? ?? */
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-hover: #353535;
    --bg-code: #2a2a2a;

    /* ??? ?? */
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --text-muted: #707070;
    --text-link: #5b9bd5;
    --text-link-hover: #7ab0e0;

    /* ??? ?? */
    --border-primary: #404040;
    --border-secondary: #4a4a4a;
    --border-hover: #4a7ba7;

    /* ?? ?? */
    --btn-primary-bg: #4a7ba7;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #3d6687;
    --btn-secondary-bg: #4a4a4a;
    --btn-secondary-text: #e0e0e0;
    --btn-secondary-hover: #5a5a5a;

    /* ?? ?? */
    --color-success: #4caf50;
    --color-danger: #ef5350;
    --color-warning: #ffb300;
    --color-info: #29b6f6;

    /* ??/??? */
    --vote-up-bg: #1b5e20;
    --vote-up-text: #81c784;
    --vote-down-bg: #b71c1c;
    --vote-down-text: #ef9a9a;

    /* ?? ?? (?????? ???? ???) */
    --btn-like-bg: #a83232;
    --btn-like-border: #8a2828;
    --btn-like-hover: #922a2a;

    /* ??? */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* ============================================
   ?? ???
   ============================================ */
body,
button,
input,
select,
table,
textarea {
    font-family: "Roboto", "Noto Sans KR", 나눔고딕, "Nanum Gothic", "Malgun Gothic", 맑은고딕, 굴림, 돋움, "Dotum", sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

/* ?? ?? ??? - ?? ?? */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* ??? ? ??? ?? ?? ??? */
img {
    display: inline-block;
    vertical-align: middle;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

video,
canvas,
audio {
    display: inline-block;
    vertical-align: middle;
}

iframe,
embed,
object {
    display: block;
    vertical-align: middle;
    max-width: 100%;
}

/* ?? ??? ? ???? ???? max-width ?? */
.board-view-content img,
.board-view-content video,
.board-comment-content img,
.board-comment-content video {
    max-width: 100%;
    height: auto;
}

/* ============================================
   ?? ??
   ============================================ */
.board-title-font {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.5;
}

.board-text-font {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6;
}

.board-small-font {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
}

/* ============================================
   ?? ?
   ============================================ */
.board-text-primary {
    color: var(--text-primary);
}

.board-text-secondary {
    color: var(--text-secondary);
}

.board-text-tertiary {
    color: var(--text-tertiary);
}

.board-bg-primary {
    background-color: var(--bg-secondary);
}

.board-bg-secondary {
    background-color: var(--bg-tertiary);
}

.board-border-color {
    border-color: var(--border-primary);
}

.board-link-color {
    color: var(--text-link);
}

.board-link-hover-color {
    color: var(--text-link-hover);
}

/* ============================================
   ??? ??? ???
   ============================================ */
.board-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border-primary);
}

.board-table th {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    border-left: none !important;
    border-right: none !important;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 8px;
    line-height: 1.5;
    text-align: left;
}

.board-table td {
    border-bottom: 1px solid var(--border-primary);
    border-left: none !important;
    border-right: none !important;
    padding: 10px 8px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ?? ?? ?? ?? ?? ?? */
.board-table th,
.board-table td {
    border-left: none !important;
    border-right: none !important;
}

/* :last-child ???? ?? ?? ?? ?? - ?? ??? ??? ?? ?? ?? */
.board-table th:last-child,
.board-table td:last-child,
.board-table th:first-child,
.board-table td:first-child,
.board-table thead th:last-child,
.board-table thead td:last-child,
.board-table tbody th:last-child,
.board-table tbody td:last-child,
.board-table tfoot th:last-child,
.board-table tfoot td:last-child {
    border-left: none !important;
    border-right: none !important;
    border-right: 0 !important;
    border-left: 0 !important;
}

.board-table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.board-table tbody tr:hover {
    background-color: var(--bg-hover);
}

.board-table tbody tr:last-child td {
    border-bottom: none;
}

/* ??? ??? */
.board-table tbody tr.current-post {
    background-color: var(--bg-hover);
}

.board-table tbody tr.current-post:hover {
    background-color: var(--bg-hover);
}

/* ============================================
   ?? ???
   ============================================ */
.badge-new {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-new img {
    width: 100%;
    height: 100%;
    display: block;
}

.badge-image {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-image img {
    width: 100%;
    height: 100%;
    display: block;
}

.badge-video {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-video img {
    width: 100%;
    height: 100%;
    display: block;
}

.badge-poll {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-poll img {
    width: 100%;
    height: 100%;
    display: block;
}

.badge-current {
    display: inline-block;
    background-color: #0096ff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ??? ??? ??? ?? */
.board-item {
    padding: 0.75rem 1rem;
}

/* ?? ??? */
.comment-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

/* ============================================
   ??? ?? ?? ???
   ============================================ */
.board-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.board-title-link:visited {
    color: var(--text-tertiary);
}

.board-title-link:hover {
    color: var(--text-link);
    text-decoration: underline;
}

.board-title-link:visited:hover {
    color: var(--text-link);
}

/* ============================================
   ??? ??? ???
   ============================================ */
.author-avatar {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #e0e0e0;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
    border: 1px solid #d0d0d0;
}

/* ??? ??? - ? ? ?? */
.author-name {
    display: inline-block;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* GNB ??? */
.gnb {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.gnb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.gnb-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
}

.gnb-logo:hover {
    color: #2563eb;
}

.gnb-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gnb-menu-item {
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.gnb-menu-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.gnb-menu-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

/* ============================================
   ?? ?? ???
   ============================================ */
.board-search-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.board-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.board-search-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
}

.board-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.board-search-input::placeholder {
    color: var(--text-secondary);
}

.board-search-input:focus {
    outline: none;
    border-color: var(--border-hover);
}

.board-search-button {
    padding: 0.6rem 1.25rem;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.board-search-button:hover {
    background-color: var(--btn-primary-hover);
}

/* ============================================
   ?????? ???
   ============================================ */
.board-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.board-pagination-button {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
}

.board-pagination-button:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-secondary);
}

.board-pagination-button.active {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
    font-weight: 500;
}

.board-pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   ??? ? ???
   ============================================ */
.board-view-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.board-view-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.board-view-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.board-view-meta {
    font-size: 0.875rem;
    color: #666666;
}

.view-header-util {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 1rem;
}

.view-header-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem;
}

.view-header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem;
    margin-left: auto !important;
}

.view-header-icon {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle;
    flex-shrink: 0;
}

.view-header-nick {
    color: #000000;
    font-weight: 500;
}

.view-header-date {
    color: #666666;
}

.view-header-date em {
    font-style: normal;
    color: #999999;
}

.view-header-right span {
    color: #666666;
}

.view-header-right span em {
    font-style: normal;
    color: #000000;
    font-weight: 500;
}

/* ============================================
   ?? ?? ???
   ============================================ */
.board-comment-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.board-comment-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.board-comment-form {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.board-comment-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    overflow-y: hidden;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.board-comment-textarea:focus {
    outline: none;
    border-color: var(--border-hover);
}

.board-comment-button {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    float: right;
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.board-comment-button:hover {
    background-color: var(--bg-hover);
    border-color: var(--text-secondary);
}

.board-comment-submit {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    float: right;
}

.board-comment-submit:hover {
    background-color: var(--btn-primary-hover);
}

.board-comment-item {
    padding: 0.5rem 0 0 0;
    border-top: 1px solid var(--border-primary);
}

.board-comment-author {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.board-comment-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.board-comment-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0.5rem 0 1rem 0;
}

.board-comment-content a,
.reply_content a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.board-comment-actions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #999999;
    margin-top: 0.5rem;
}

.board-comment-action {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    transition: color 0.15s ease-in-out;
}

.board-comment-action:hover {
    color: #0066cc;
}

/* ============================================
   ??? ?? ???
   ============================================ */
.board-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.board-button:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-secondary);
}

.board-button-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
}

.board-button-primary:hover {
    background-color: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

.board-button-danger {
    background-color: var(--color-danger);
    color: var(--btn-primary-text);
    border-color: var(--color-danger);
}

.board-button-danger:hover {
    background-color: #aa0000;
    border-color: #aa0000;
}

/* ============================================
   ??? ???
   ============================================ */
@media (max-width: 768px) {
    .board-table {
        font-size: 0.75rem;
    }

    .board-table th,
    .board-table td {
        padding: 0.5rem 0.375rem;
    }

    .col-no {
        width: auto;
        min-width: 50px;
    }

    .badge-current {
        font-size: 10px;
        padding: 2px 5px;
        margin-left: 0;
        white-space: nowrap;
    }

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

    .board-search-input {
        min-width: 100%;
    }

    .board-pagination {
        gap: 0.125rem;
    }

    .board-pagination-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .board-view-container {
        padding: 1rem;
    }

    .board-view-title {
        font-size: 1.125rem;
    }

    .board-comment-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .badge-current {
        font-size: 9px;
        padding: 1px 4px;
    }

    .col-no {
        min-width: 45px;
    }
}

@media (max-width: 768px) {
    .gnb-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gnb-menu::-webkit-scrollbar {
        display: none;
    }
}

/* ============================================
   ?? ?? ???
   ============================================ */
.footer-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.footer-menu-item {
    text-decoration: none;
    font-weight: bold;
    padding: 0 0.5rem;
    transition: color 0.15s ease-in-out;
}

.footer-menu-item:hover {
    color: #333333;
    text-decoration: none;
}

.footer-menu-divider {
    color: #cccccc;
    font-size: 0.75rem;
    padding: 0 0.25rem;
}

/* ============================================
   ????? ?? ??? ???
   ============================================ */
.nav-menu-item {
    position: relative;
    display: inline-block;
}

.nav-menu-item:hover {
    color: var(--border-hover) !important;
}

.nav-menu-item.nav-active::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0px;
    background: var(--border-hover);
}

/* ============================================
   ???? ?? ??
   ============================================ */
.theme-toggle-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-hover);
}

.theme-toggle-btn .theme-icon {
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: rotate(20deg);
}

/* ============================================
   ??? ??? ????
   ============================================ */
.board-container {
    width: 1200px;
    margin: 0 auto;
    padding: 6rem 0 2rem;
}

.board-container-inner {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

.board-main {
    width: 930px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    padding: 1rem;
    min-height: 1000px;
}

.board-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
}

@media (max-width: 1220px) {
    .board-container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .board-container-inner {
        flex-direction: column;
        gap: 0;
    }
    .board-main {
        width: 100%;
    }
    .board-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e8e8e8;
    }
}

@media (max-width: 768px) {
    .board-container {
        padding: 5rem 0 1.5rem;
    }
    .board-main {
        padding: 0 0.75rem;
    }
}

/* ============================================
   ??? ??
   ============================================ */
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 1rem;
    margin-bottom: 20px;
    margin-top: 0;
}

.board-header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

/* ============================================
   ??? ??? ?? ???
   ============================================ */
.col-no {
    width: 65px;
    text-align: left;
    color: var(--text-tertiary);
}

.col-title {
    text-align: left;
}

.col-author {
    width: 150px;
    min-width: 150px;
    text-align: left;
    padding-right: 20px !important;
}

.col-author-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.col-author-inner img {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.col-author-inner .dropdown-menu {
    display: block;
}

.col-author-inner .dropdown-menu .dropmenu-item {
    top: -4px;
    left: -25px;
}

.col-date {
    width: 120px;
    text-align: left;
    color: var(--text-tertiary);
    padding-left: 20px !important;
}

.col-views {
    width: 50px;
    text-align: left;
    color: var(--text-tertiary);
}

.col-likes {
    width: 50px;
    text-align: left;
    color: var(--text-tertiary);
}

/* ============================================
   ??? ??
   ============================================ */
.board-author-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.board-author-wrap img {
    width: 18px;
    height: 18px;
}

.board-author-wrap span {
    color: var(--text-primary);
    white-space: nowrap;
    display: inline-block;
    max-width: 10ch;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   ?? ? ??
   ============================================ */
.board-comment-cnt {
    color: #ff6600;
    font-weight: 400;
    margin-left: 4px;
}

/* ============================================
   ??? ?? ??
   ============================================ */
.board-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 0;
}

/* ============================================
   ?? ??
   ============================================ */
.badge-new-today {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-new-today img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================================
   ??? ???? (history)
   ======================================== */
.board-submenu {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 16px;
}

.submenu-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.submenu-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submenu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.submenu-item.active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-weight: 500;
}

.submenu-item.active:hover {
    background: var(--btn-primary-hover);
}

.submenu-count {
    font-size: 11px;
    color: var(--text-tertiary);
}

.submenu-item.active .submenu-count {
    color: rgba(255, 255, 255, 0.8);
}

/* ??? ??? */
@media (max-width: 768px) {
    .board-submenu {
        padding: 10px;
    }

    .submenu-items {
        gap: 4px;
    }

    .submenu-item {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.video-embed-vertical {
    aspect-ratio: 9 / 16;
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   ??? ??
   ======================================== */
.ico-pc {
    background: url("../img/common/icon_common.png");
    display: inline-block;
    overflow: hidden;
    text-indent: -3000px;
}

/*?? ???*/
.report {
    width: 12px;
    height: 12px;
    background-position: -149px -176px;
}

.report:hover {
    background-position: -167px -176px;
}

/* ========================================
   ??? ?? ???
   ======================================== */
.emoji-picker-wrapper {
    position: relative;
    display: inline-block;
}

.emoji-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.emoji-toggle-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-secondary);
}

.emoji-toggle-btn-sm {
    padding: 4px 8px;
    font-size: 16px;
}

.emoji-picker-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 1000;
    width: 320px;
    max-height: 280px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    margin-bottom: 8px;
}

.emoji-category {
    margin-bottom: 12px;
}

.emoji-category:last-child {
    margin-bottom: 0;
}

.emoji-category-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.emoji-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.emoji-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-primary);
    transform: scale(1.1);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* ??? - ?? ???? ?? ?? ?? */
@media (max-width: 768px) {
    .emoji-picker-panel {
        width: 280px;
        max-height: 240px;
    }

    .emoji-btn {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}

/* ============================================
   ??? ?? ???? (view, hot-view, form, list?? ?? ??)
   ============================================ */
.board-container {
    width: 1200px;
    margin: 0 auto;
    padding: 6rem 0 2rem;
}

.board-container-inner {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

.board-main {
    width: 930px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    padding: 1rem;
    min-height: 1000px;
}

.board-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
}

@media (max-width: 1220px) {
    .board-container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .board-container-inner {
        flex-direction: column;
        gap: 0;
    }
    .board-main {
        width: 100%;
    }
    .board-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-primary);
    }
}

@media (max-width: 768px) {
    .board-container {
        padding: 5rem 0.75rem 1.5rem;
    }
    .board-main {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .board-container {
        padding: 5rem 0.5rem 1rem;
    }
}

/* ============================================
   ??? ?? ? (view, hot-view ??)
   ============================================ */
.board-view-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.board-view-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.board-view-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.board-view-meta-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.board-view-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.board-view-content {
    min-height: 200px;
    line-height: 1.7;
    color: var(--text-primary);
    word-break: break-word;
    font-size: 0.875rem;
    padding: 1rem 0;
    word-wrap: break-word;
}

.board-view-content img {
    margin: 0.5rem 0;
    display: block;
}

/* ?? ? p ?? ??? */
.board-view-content p {
    margin: 0;
}

/* ?? ? ?? ?? ??? */
.board-view-content h1 {
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.4;
    color: var(--text-primary);
}

.board-view-content h2 {
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    margin: 1.25rem 0 0.875rem 0;
    line-height: 1.4;
    color: var(--text-primary);
}

.board-view-content h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    margin: 1rem 0 0.75rem 0;
    line-height: 1.5;
    color: var(--text-primary);
}

.board-view-content h4 {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    margin: 0.875rem 0 0.625rem 0;
    line-height: 1.5;
    color: var(--text-primary);
}

.board-view-content h5 {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.board-view-content h6 {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    margin: 0.625rem 0 0.5rem 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.board-view-actions-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.board-view-actions-bottom .board-button-group {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   ??? ??? ?? (view.blade.php? ?? ??? ???)
   ============================================ */
.board-list-section {
    margin-top: 80px;
}

.board-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

@media (max-width: 768px) {
    .board-list-section {
        margin-top: 40px;
        width: 100%;
        display: block;
    }
    .board-list-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
        padding: 0 0.75rem;
    }
    .board-table-wrapper {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .board-list-section {
        margin-top: 30px;
    }
    .board-list-section h3 {
        padding: 0 0.5rem;
    }
    .board-table-wrapper {
        margin: 0;
        padding: 0;
    }
}

/* ============================================
   ??/??? ?? (view, hot-view ??)
   ============================================ */
.recommend {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.recommend > button {
    position: relative;
    width: 98px;
    height: 78px;
    border-radius: 2px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.recommend .like {
    background: var(--btn-like-bg);
    border: 1px solid var(--btn-like-border);
    color: #fff;
}

.recommend .like:hover {
    background: var(--btn-like-hover);
}

.recommend .dislike {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    margin-left: 10px;
    color: var(--text-primary);
}

.recommend .dislike:hover {
    background: var(--bg-hover);
}

.recommend .board-like-icon,
.recommend .board-dislike-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    display: block;
}

.recommend .board-dislike-icon {
    opacity: 0.6;
}

.recommend .board-like-text,
.recommend .board-dislike-text {
    text-align: center;
    font-size: 0.875rem;
}

.recommend .board-like-text strong,
.recommend .board-dislike-text strong {
    font-weight: 700;
}

/* ============================================
   ?? ?? ???
   ============================================ */
.board-comment-section {
    margin-top: 1.5rem;
}

.board-comment-action-danger {
    color: #dc3545 !important;
}

.board-comment-action-danger:hover {
    color: #c82333 !important;
    background-color: #f8d7da !important;
}

.board-comment-edit-form {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0.25rem;
}

/* ============================================
   ???/?? ?
   ============================================ */
.board-form-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 1.5rem;
}

.board-form-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.board-form-group {
    margin-bottom: 1.5rem;
}

.board-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.board-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-family: inherit;
}

.board-form-input:focus {
    outline: none;
    border-color: var(--border-hover);
}

.board-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-family: inherit;
    resize: vertical;
    min-height: 300px;
}

.board-form-textarea:focus {
    outline: none;
    border-color: var(--border-hover);
}

.board-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* ============================================
   ??? ??? ?? ???
   ============================================ */
.hot-view-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 16px;
}

.hot-view-back:hover {
    color: var(--border-hover);
}

.hot-view-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.hot-view-actions .board-button-group {
    display: flex;
    gap: 0.5rem;
}

.hot-view-nav {
    display: flex;
    gap: 0.5rem;
}

.hot-view-nav .board-button {
    min-width: 70px;
    text-align: center;
}

.hot-view-nav .board-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.hot-list-section {
    margin-top: 2rem;
}

.hot-list-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.hot-header-desc {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ??? ?? ?? */
.hot-group-section {
    background: transparent;
    border: none;
    margin-bottom: 24px;
    margin-left: 20px;
}

.hot-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    background: transparent;
    border-bottom: none;
}

.hot-group-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.hot-group-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

.hot-item-bbs-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-link);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 6px;
}

[data-theme="dark"] .hot-item-bbs-badge {
    background: var(--bg-tertiary);
    color: var(--text-link);
}

.hot-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.hot-group-section .board-table {
    border-left: none;
    border-right: none;
}

/* ============================================
   ????? ???
   ============================================ */
.my-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem;
}

@media (max-width: 768px) {
    .my-container {
        padding: 5rem 1rem 1.5rem;
    }
}

.my-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
}

.my-nick {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.my-nick img {
    width: 24px;
    height: 24px;
}

.my-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.my-point {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.my-point em {
    font-style: normal;
    font-weight: 600;
    color: var(--btn-primary-bg);
}

.btn-rank-guide {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-rank-guide:hover {
    background: var(--bg-hover);
}

/* ============================================
   ??/?? ??? ?? ???
   ============================================ */
.popup_comp-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
}

.popup_comp-box h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #666666;
    padding: 0.5rem;
}

.btn-close:hover {
    color: #000000;
}

.popup_comp-contents {
    max-width: 600px;
    margin: 0 auto;
}

.my-detail-list {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.my-detail-list th {
    background-color: var(--bg-tertiary);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.my-detail-list th em {
    font-style: normal;
    font-size: 0.75rem;
    color: #666666;
}

.my-detail-list td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 0.875rem;
}

.my-detail-list td:first-child {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.my-detail-list td img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.my-detail-list--body {
    /* ??? ?? ?? ?? */
}

.tb-class-guide {
    margin-top: 0;
}

@media (max-width: 768px) {
    .popup_comp-contents {
        overflow-x: auto;
    }
    .my-detail-list {
        min-width: 500px;
    }
    .my-detail-list th,
    .my-detail-list td {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* ============================================
   ?? ??? ???
   ============================================ */
.terms-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.terms-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e40af;
}

.terms-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e40af;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.terms-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #2563eb;
}

.terms-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #374151;
}

.terms-content ul,
.terms-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #374151;
}

.terms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.terms-content th,
.terms-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.terms-content th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #1f2937;
}

@media (max-width: 768px) {
    .terms-content {
        padding: 1.5rem;
    }
    .terms-content h1 {
        font-size: 1.5rem;
    }
    .terms-content h2 {
        font-size: 1.25rem;
    }
    .terms-content h3 {
        font-size: 1.1rem;
    }
}

/* ============================================
   ???? ???
   ============================================ */
.sidebar-inner {
    padding: 16px 12px;
}

.sidebar-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.sidebar-info-icon {
    cursor: help;
    color: var(--text-tertiary);
    font-weight: 400;
}

.sidebar-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-post-item {
    border-bottom: 1px solid var(--border-primary);
}

.sidebar-post-link {
    display: block;
    padding: 9px 12px;
    margin: 0 -12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.15s;
    overflow: hidden;
}

.sidebar-post-link:visited {
    color: var(--text-tertiary);
}

.sidebar-post-link:visited .sidebar-post-title {
    color: var(--text-tertiary);
}

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

.sidebar-post-link.current {
    background-color: var(--bg-hover);
}

.sidebar-post-link.current .sidebar-post-title {
    color: var(--border-hover);
    font-weight: 500;
}

.sidebar-post-title {
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.sidebar-post-meta {
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sidebar-empty-message {
    color: var(--text-tertiary);
    padding: 20px 0;
    text-align: center;
}

.sidebar-post-meta img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   ???? ??? (???? ?? ??)
   ============================================ */
/* ??? ?? */
.text-primary {
    color: #000000;
}

.text-secondary {
    color: #666666;
}

.text-tertiary {
    color: #999999;
}

.text-muted {
    color: #888888;
}

.text-white {
    color: #ffffff;
}

.text-black {
    color: #000000;
}

/* ?? ?? */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-light {
    background-color: #f5f5f5;
}

.bg-gray-lighter {
    background-color: #f8f9fa;
}

.bg-gray {
    background-color: #e0e0e0;
}

/* ?? ?? */
.border-gray {
    border-color: #e0e0e0;
}

.border-gray-light {
    border-color: #e8e8e8;
}

.border-gray-dark {
    border-color: #d0d0d0;
}

/* ??? ???? */
.flex {
    display: flex;
}

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

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

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

.justify-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* ?? ???? */
.m-0 {
    margin: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* ?? ?? */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

/* ?? ?? */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* ?? ???? */
.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.whitespace-nowrap {
    white-space: nowrap;
}

/* ============================================
   ??? ???? ??
   ============================================ */
.dropdown-menu {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.dropdown-menu .dropmenu-item {
    display: none;
    position: absolute;
    top: -20%;
    left: -80%;
    background-color: var(--bg-secondary);
    width: max-content;
    min-width: max-content;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-menu.active .dropmenu-item {
    display: block;
}

.dropdown-menu .dropmenu-header {
    margin: 0;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-primary);
    background-color: var(--bg-tertiary);
}

.dropdown-menu .dropmenu-item a {
    display: block;
    padding: 6px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-menu .dropmenu-item a:hover {
    background-color: var(--bg-hover);
    color: var(--text-link);
}

.dropdown-menu .dropmenu-item-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: default;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.dropdown-menu .dropmenu-item-text img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dropdown-menu .dropmenu-user-nick {
    margin-right: 0;
}

/* ========================================
   ???? ????? ??
   ======================================== */

.comment-image-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.comment-image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-image-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.comment-image-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.comment-image-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-image-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-image-modal-close:hover {
    color: var(--text-primary);
}

/* ??*/
.comment-image-modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-primary);
}

.comment-image-modal-tabs .tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-image-modal-tabs .tab-btn:hover {
    color: var(--text-primary);
}

.comment-image-modal-tabs .tab-btn.active {
    color: var(--btn-primary-bg);
    border-bottom-color: var(--btn-primary-bg);
}

/* ?? */
.comment-image-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ??????????*/
.upload-dropzone {
    border: 2px dashed var(--border-primary);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-tertiary);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--btn-primary-bg);
    background: var(--bg-hover);
}

.upload-dropzone.hidden {
    display: none;
}

.upload-dropzone p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 12px;
    color: var(--text-tertiary) !important;
}

/* ???? */
.upload-preview {
    position: relative;
    text-align: center;
    padding: 16px;
}

.upload-preview.hidden {
    display: none;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ?? ??? */
.share-options {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-primary);
}

.share-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
}

.share-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.share-details {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.share-details .form-group {
    margin-bottom: 12px;
}

.share-details .form-group:last-child {
    margin-bottom: 0;
}

.share-details label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.share-details select,
.share-details input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

/* ?? ???: ??? | ??? */
.gallery-label {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.gallery-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gallery-sort-toggle {
    padding: 6px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.gallery-sort-toggle:hover {
    color: var(--text-primary);
}

.gallery-sort-toggle.active {
    color: var(--btn-primary-bg);
    font-weight: 600;
}

.gallery-sort-divider {
    color: var(--text-tertiary);
    font-size: 14px;
    user-select: none;
}

/* ?? ???: ?? ? */
.gallery-emotion-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.gallery-emotion-tab {
    padding: 6px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-emotion-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.gallery-emotion-tab.active {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.gallery-search-row {
    margin-bottom: 12px;
}

.gallery-search-row input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
}

.gallery-search-row input[type="text"]::placeholder {
    color: var(--text-tertiary);
}

/* ????? ????????*/
.image-gallery {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 8px;
}

.gallery-item {
 position: relative;
 aspect-ratio: 1;
 border-radius: 8px;
 overflow: hidden;
 cursor: pointer;
 border: 2px solid transparent;
 transition: all 0.2s;
}

.gallery-item:hover {
 opacity: 0.9;
}

.gallery-item img {
 width: 100%;
 height: 100%;
 object-fit: cover;
}

.gallery-item.selected {
    border-color: var(--btn-primary-bg);
}

.gallery-item.selected::after {
    content: '?';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    background: var(--btn-primary-bg);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* ??? ??? ?? ???? */
.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    color: white;
    font-size: 11px;
    z-index: 1;
}

.emotion-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 18px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 1;
}

.use-count {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 10px;
}

.gallery-item-info .tags {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.tag-badge {
    background: rgba(255,255,255,0.25);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 9px;
    line-height: 1.2;
    backdrop-filter: blur(4px);
}

/* ??? ?? ?? */
.gallery-progress {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 12px;
}

.gallery-progress.hidden {
    display: none;
}

/* ??? ?? */
.gallery-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
}

.gallery-loading.hidden {
    display: none;
}

.gallery-loading span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ??? ?? */
.gallery-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 16px 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-load-more:hover {
    background: var(--bg-hover);
    border-color: var(--btn-primary-bg);
    color: var(--btn-primary-bg);
}

.gallery-load-more.hidden {
    display: none;
}

/* ?? ??? */
.gallery-complete {
    text-align: center;
    padding: 16px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.gallery-complete.hidden {
    display: none;
}

/* ? ??? */
.gallery-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-tertiary);
}

.gallery-empty.hidden {
    display: none;
}

.comment-image-modal-footer {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-primary);
}

.comment-image-modal-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

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

.btn-confirm {
    background: var(--btn-primary-bg);
    border: none;
    color: var(--btn-primary-text);
}

.btn-confirm:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
 ???? ??? ????? ???
 ======================================== */

.comment-image-preview {
 margin: 8px 0;
}

.comment-image-preview.hidden {
 display: none;
}

.comment-attached-image {
 position: relative;
 display: inline-block;
}

.comment-attached-image img {
 max-width: 90%;
 max-height: 200px;
 border-radius: 8px;
}

.attached-image-remove {
 position: absolute;
 top: -8px;
 right: -8px;
 width: 24px;
 height: 24px;
 border-radius: 50%;
 background: var(--color-danger, #dc3545);
 color: white;
 border: none;
 font-size: 16px;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
}

.attached-image-remove:hover {
 opacity: 0.8;
}

/* ???? ?? ??????? */
.comment-image {
    margin: 8px 0;
}

.comment-image img {
    max-width: 90%;
    max-height: 200px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain;
}

.comment-image img:hover {
    opacity: 0.95;
}

/* ????? ?? */
.comment-image-btn {
 padding: 6px 12px;
 background: var(--bg-tertiary);
 border: 1px solid var(--border-primary);
 border-radius: 6px;
 color: var(--text-secondary);
 font-size: 13px;
 cursor: pointer;
 transition: all 0.2s;
}

.comment-image-btn:hover {
 background: var(--bg-hover);
 color: var(--text-primary);
}
