[x-cloak] { display: none !important; }

#board-container { background-color: var(--bg-main, #ffffff); color: var(--text-main, #1a1a1a); width: 100%; position: relative; z-index: 50; padding-bottom: 80px; transition: background-color 0.3s, color 0.3s; }
body.theme-dark #board-container, body.theme-midnight #board-container { background-color: var(--bg-main, #050505) !important; color: var(--text-main, #e5e5e5) !important; }

.market-heatmap-host {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
    background: #0a0a0c;
}

.market-heatmap-host .tradingview-widget-container,
.market-heatmap-host .tradingview-widget-container__widget,
.market-heatmap-host iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    display: block !important;
}

.market-heatmap-host .tradingview-widget-copyright {
    display: none !important;
}

.masonry-grid { display: block !important; width: 100% !important; position: relative; }
.masonry-item { width: 48%; margin-bottom: 16px; display: inline-block; vertical-align: top; break-inside: avoid; }
@media (min-width: 1200px) { .masonry-item { width: 15.8%; } }

.store-card, .forum-card { background-color: var(--bg-island, #ffffff); border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.02); cursor: pointer; }
body.theme-dark .store-card, body.theme-dark .forum-card { background-color: var(--bg-island, #111111); box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); }
.store-card:hover, .forum-card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); }

.gallery-card { border-radius: 28px; position: relative; padding: 6px; background-color: var(--bg-island); cursor: pointer; }
.gallery-img-box { position: relative; border-radius: 24px; overflow: hidden; display: flex; align-items: center; justify-content: center; }

.gallery-img-box img { width: 100%; height: auto; display: block; border-radius: 24px; object-fit: cover; }
.forum-card-img-wrap img { width: 100%; height: auto; display: block; border-radius: 16px; object-fit: cover; }

.gallery-info-overlay { position: absolute; bottom: 8px; left: 8px; width: fit-content; max-width: 90%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); padding: 6px 12px 6px 6px; border-radius: 99px; display: flex; align-items: center; gap: 8px; color: white; }
.gallery-chat-btn-wrap { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
.gallery-chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.72);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.gallery-chat-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.92);
    color: #111111;
    border-color: rgba(255,255,255,0.92);
}

body.character-chat-open {
    overflow: hidden !important;
}
.character-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    overflow: hidden;
    background: #000000;
}
.character-chat-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(14px);
    transform: scale(1.08);
    opacity: 0.9;
}
.character-chat-dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.56) 0%, rgba(0,0,0,0.75) 38%, rgba(0,0,0,0.9) 100%);
}
.character-chat-shell {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.character-chat-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px 16px;
}
.character-chat-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.character-chat-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.45);
    color: #ffffff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.character-chat-prompt-chip {
    margin: 0 16px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.32);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.character-chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.character-chat-feed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}
.character-chat-feed > * {
    position: relative;
    z-index: 1;
}
.character-chat-row {
    display: flex;
}
.character-chat-row.assistant {
    justify-content: flex-start;
}
.character-chat-row.user {
    justify-content: flex-end;
}
.character-chat-bubble {
    max-width: min(78vw, 560px);
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    backdrop-filter: blur(8px);
}
.character-chat-row.assistant .character-chat-bubble {
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    border: 1px solid rgba(255,255,255,0.42);
}
.character-chat-row.user .character-chat-bubble {
    background: rgba(37,99,235,0.86);
    color: #ffffff;
    border: 1px solid rgba(147,197,253,0.48);
}
.character-chat-composer {
    padding: 10px 12px 14px 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.character-chat-input {
    flex: 1;
    min-height: 46px;
    max-height: 130px;
    resize: none;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    outline: none;
}
.character-chat-input::placeholder {
    color: rgba(255,255,255,0.72);
}
.character-chat-send {
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}
.character-chat-send:disabled {
    opacity: 0.45;
    cursor: default;
}
.character-chat-send:not(:disabled):hover {
    background: rgba(255,255,255,0.95);
    color: #111111;
    transform: translateY(-1px);
}

.forum-meta-bar { background-color: rgba(0, 0, 0, 0.02); padding: 14px 18px; margin-top: auto; font-size: 0.75rem; color: var(--text-dim); display: flex; align-items: center; justify-content: space-between; }

.board-layout { display: flex; align-items: stretch; width: 100%; gap: 0 !important; padding: 0 12px !important; box-sizing: border-box; }
.board-left-nav {
    width: 78px;
    min-width: 78px;
    flex: 0 0 78px;
    display: none !important;
    justify-content: center;
    padding-top: 0;
    align-self: stretch;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    height: auto !important;
    inset: auto !important;
    pointer-events: auto !important;
    z-index: 20;
}
.board-main-content { flex: 1 1 auto; min-width: 0; }

.nav-scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0.9rem;
    justify-content: flex-start;
    padding: 0.85rem 0.4rem;
    width: 100%;
    max-height: calc(100vh - 24px);
    background: #ffffff !important;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
    scrollbar-gutter: stable both-edges;
}
.board-left-nav .nav-scroll-container {
    position: sticky !important;
    top: 12px !important;
    align-self: flex-start;
    max-height: calc(100vh - 24px);
    border-radius: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06) !important;
    overflow-x: hidden !important;
}
body.theme-dark .board-left-nav .nav-scroll-container,
body.theme-midnight .board-left-nav .nav-scroll-container {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10) !important;
}
.nav-scroll-container::-webkit-scrollbar { width: 6px; display: block; }
.nav-scroll-container::-webkit-scrollbar-track { background: transparent; }
.nav-scroll-container::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.24); border-radius: 999px; }
.nav-scroll-container::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.38); }

@media (min-width: 768px) {
    .board-layout {
        padding: 0 16px !important;
        box-sizing: border-box;
    }
    .board-left-nav {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        height: auto !important;
        z-index: 20;
        padding-top: 0;
        pointer-events: auto;
    }
    .board-left-nav .nav-scroll-container {
        position: sticky;
        top: 12px;
        max-height: calc(100vh - 24px);
        pointer-events: auto;
    }
}
@media (min-width: 901px) {
    .board-left-nav {
        display: none !important;
    }
    .board-layout {
        gap: 0 !important;
        padding: 0 12px !important;
    }
}

@media (max-width: 767px) {
    .board-layout { display: flex; padding: 0 8px !important; min-width: 0; box-sizing: border-box; gap: 0 !important; }
    .board-left-nav {
        width: 58px;
        min-width: 58px;
        flex: 0 0 58px;
        display: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        height: auto !important;
        align-self: stretch;
        padding-top: 0;
        z-index: 20;
        pointer-events: auto;
    }
    .board-main-content { width: 100%; flex: 1 1 auto; min-width: 0; }
    .nav-scroll-container {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        white-space: normal;
        gap: 0.55rem;
        padding: 0.65rem 0.15rem;
        max-height: calc(100vh - 16px);
        justify-content: flex-start;
    }
    .board-left-nav .nav-scroll-container { position: sticky; top: 8px; pointer-events: auto; }
    .nav-icon-btn { width: 40px !important; height: 40px !important; font-size: 19px !important; border-radius: 14px !important; }
}

.nav-icon-btn { width: 48px; height: 48px; font-size: 22px; color: #5f5f5f; background: transparent; border-radius: 20px; display: flex; align-items: center; justify-content: center; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); flex-shrink: 0; }
.nav-icon-btn.active { color: #111111; background: rgba(0,0,0,0.06); transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.board-left-nav .nav-icon-btn { color: #5f5f5f !important; }
.board-left-nav .nav-icon-btn.active { color: #111111 !important; background: rgba(0,0,0,0.06) !important; }

.board-news-nav-wrap {
    width: 100%;
    padding: 24px 16px 0 16px;
    box-sizing: border-box;
}
.board-news-nav-container {
    background: var(--bg-island, #ffffff);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 9999px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 auto;
    width: 100%;
    max-width: 560px;
}
body.theme-dark .board-news-nav-container,
body.theme-midnight .board-news-nav-container {
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.24);
}
.board-news-scroll-area {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}
.board-news-nav-container.search-mode .board-news-scroll-area {
    display: none;
}
.news-search-input-area {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    padding: 0 16px;
}
.board-news-nav-container.search-mode .news-search-input-area {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.board-news-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    border-radius: 50%;
    flex-shrink: 0;
    color: var(--text-dim, #6b7280);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}
.board-news-icon-btn:hover {
    background-color: rgba(127,127,127, 0.1);
    color: var(--text-main, #111);
}
.board-news-icon-btn.active {
    background-color: var(--text-main, #111);
    color: var(--bg-main, #fff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
body.theme-dark .board-news-icon-btn.active,
body.theme-midnight .board-news-icon-btn.active {
    background-color: #ffffff;
    color: #111111;
}
#board-news-nav-bar {
    position: relative;
    overflow: hidden;
}
.board-spirit-notice {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    font-family: inherit;
    color: var(--text-main, #111111);
    background: var(--bg-island, #ffffff);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 8;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.board-spirit-notice.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    cursor: pointer;
    transition-delay: 0s;
}
.board-spirit-notice.fade-out {
    opacity: 0;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
@media (max-width: 768px) {
    .board-spirit-notice {
        font-size: 12px;
        padding: 0 12px;
    }
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

@media (max-width: 900px) {
    .board-news-nav-wrap {
        padding: 24px 16px 0 16px;
    }
    .board-main-content {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
}

.cat-nav-container {
    border-radius: 9999px;
    height: 56px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 auto;
    width: 100%; max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(10, 10, 11, 0.52) !important;
}

.cat-scroll-area {
    display: flex; align-items: center; gap: 8px;
    padding: 0 10px;
    width: 100%; height: 100%;
    overflow-x: auto; white-space: nowrap;
    opacity: 1; transition: opacity 0.2s;
}
.cat-nav-container.search-mode .cat-scroll-area { display: none; }

.search-input-area {
    display: none; width: 100%; height: 100%;
    align-items: center; padding: 0 20px;
}
.cat-nav-container.search-mode .search-input-area { display: flex; animation: fadeIn 0.3s ease; }

.cat-btn-chip,
.cat-icon-btn {
    width: 42px; height: 42px; font-size: 1.25rem;
    border-radius: 50%; flex-shrink: 0;
    color: var(--text-dim, #6b7280); background: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cat-btn-chip:hover,
.cat-icon-btn:hover { background-color: rgba(127,127,127, 0.1); color: var(--text-main, #111); }
.cat-btn-chip.active,
.cat-icon-btn.active {
    background-color: var(--text-main, #111);
    color: var(--bg-main, #fff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* [Modal & Form] */
.modal-box { 
    background-color: var(--bg-island, #ffffff); 
    color: var(--text-main, #111); 
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.input-field { 
    background-color: var(--bg-main, #f3f4f6); 
    color: var(--text-main, #111); 
    border: 1px solid transparent; 
}
body.theme-dark .input-field { border-color: rgba(255,255,255,0.05) !important; }

.cat-opt {
    min-width: 60px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center;
    padding: 8px; border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.cat-opt.selected { background: var(--text-main, #111); color: var(--bg-main, #fff); }

.txt-primary { color: var(--text-main, #111); }
.txt-sub { color: var(--text-dim, #6b7280); }

.custom-scrollbar::-webkit-scrollbar { height: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.2); border-radius: 10px; }
body.theme-dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); }
.no-scrollbar::-webkit-scrollbar { display: none; }

.loading-sentinel { height: 20px; width: 100%; display: flex; justify-content: center; padding: 20px; }
.loading-sentinel.active::after { content: ''; width: 24px; height: 24px; border: 2px solid var(--text-dim); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.pinterest-grid {
    width: 100%;
}

.gallery-pin-card {
    break-inside: avoid;
    margin-bottom: 16px;
    cursor: zoom-in;
}

.gallery-pin-frame {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
    border: 1px solid rgba(255,255,255,0.06);
    transform: translateZ(0);
}

.gallery-pin-image {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
}

.gallery-pin-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    opacity: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.30) 100%);
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.gallery-pin-card:hover .gallery-pin-overlay,
.gallery-pin-card:focus-within .gallery-pin-overlay {
    opacity: 1;
}

.gallery-pin-top {
    display: flex;
    justify-content: flex-end;
}

.gallery-pin-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(230, 0, 35, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    pointer-events: auto;
    box-shadow: 0 8px 18px rgba(0,0,0,0.20);
    transition: transform 0.16s ease, background 0.16s ease;
}

.gallery-pin-save:hover {
    background: rgba(210, 0, 30, 0.98);
    transform: translateY(-1px);
}

.gallery-pin-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.gallery-pin-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.gallery-pin-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.18);
    flex-shrink: 0;
    pointer-events: auto;
}

.gallery-pin-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gallery-pin-name {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.gallery-pin-meta {
    color: rgba(255,255,255,0.72);
    font-size: 10px;
    line-height: 1.15;
}

.gallery-pin-chat {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.16);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: background 0.16s ease, transform 0.16s ease, color 0.16s ease;
    flex-shrink: 0;
}

.gallery-pin-chat:hover {
    background: rgba(255,255,255,0.92);
    color: #111111;
    transform: translateY(-1px);
}
