/* 공용 기본 테마: 현대형 커뮤니티 */
:root {
    /* 게임시세의 실제 화면 크기를 모든 공개 페이지의 공통 기준으로 사용합니다. */
    --gamecc-layout-max: 1560px;
    --gamecc-layout-inline: 28px;
    --gamecc-layout-top: 24px;
    --gamecc-layout-bottom: 44px;
    --gamecc-layout-gap: 24px;
    --gamecc-sidebar-width: 226px;
}
body {
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 56px;
    background:
        radial-gradient(circle at top left, rgba(76, 201, 240, 0.12), transparent 22%),
        radial-gradient(circle at top right, rgba(255, 183, 3, 0.10), transparent 20%),
        linear-gradient(180deg, #071120 0%, #0b1730 52%, #0a1020 100%);
    color: #e8edf7;
    line-height: 1.6;
    font-weight: 400;
}

.container {
    display: flex;
    max-width: var(--gamecc-layout-max);
    margin: 0 auto;
    /* width: 100% 상태에서도 좌우 padding까지 화면 폭 안에 포함해 모바일 가로 잘림을 막습니다. */
    box-sizing: border-box;
    padding: var(--gamecc-layout-top) var(--gamecc-layout-inline) var(--gamecc-layout-bottom);
    min-height: calc(100vh - 60px);
}

/* 상단 고정 바 스타일 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 50px;
    height: auto;
    background: rgba(6, 13, 28, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 1000;
    font-size: 0.82rem;
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', sans-serif;
}
.top-bar a {
    color: #c7d2e7;
    text-decoration: none;
    margin-right: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.top-bar a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.top-bar .left-menu {
    display: flex;
    align-items: center;
}
.top-bar .right-menu {
    display: flex;
    align-items: center;
}

@media (max-width: 900px) {
    body {
        padding-top: 112px;
    }
    .top-bar {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 6px 12px;
    }
    .top-bar .left-menu,
    .top-bar .right-menu {
        flex-wrap: wrap;
    }
    .sidebar {
        position: static;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* 링크 스타일 */
a {
    color: #e8f1ff;
    text-decoration: none;
}

a:hover {
    color: #89ecff;
    text-decoration: underline;
    background-color: transparent;
}

/* 사이드바 스타일 (너비 축소) */
.sidebar {
    width: 200px; /* 280px -> 200px로 축소 */
    background: linear-gradient(180deg, rgba(0, 10, 88, 0.96), rgba(0, 4, 52, 0.96));
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    margin-right: 20px;
    height: fit-content;
    flex-shrink: 0;
    position: sticky;
    top: 58px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    scrollbar-width: thin;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.login-section,
.user-info {
    display: grid;
    gap: 12px;
}

.login-section h3, .user-info h3 {
    color: #fbff8a;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.42);
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.1em;
    font-weight: normal;
}

.login-section input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #d8fffb;
    font-family: inherit;
    box-sizing: border-box;
    border-radius: 10px;
}

.login-section input::placeholder {
    color: #6cb8b1;
}

.login-section button, .user-info button {
    width: 100%;
    padding: 10px;
    background-color: #aaaaaa;
    color: #000000;
    border: 2px outset #ffffff;
    cursor: pointer;
    font-weight: normal;
    font-family: inherit;
    margin-top: 5px;
}

.login-section button:active, .user-info button:active {
    border: 2px inset #ffffff; /* 눌린 효과 */
}

.links {
    margin-top: 10px;
    font-size: 0.9em;
    text-align: center;
}

.user-summary {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.user-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.05rem;
}

.user-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #d5e5ff;
    font-size: 0.9rem;
}

.user-stat-row.points {
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.18);
}

.user-stat-label {
    color: #8edfff;
}

.user-stat-value {
    text-align: right;
}

.user-points {
    color: #fbff8a;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.sidebar-actions {
    display: grid;
    gap: 8px;
}

.sidebar-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f7ff;
    text-decoration: none;
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.sidebar-action-link:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 240, 255, 0.65);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    text-decoration: none;
}

.sidebar-action-link.accent-green {
    background: linear-gradient(135deg, rgba(0, 255, 170, 0.24), rgba(255, 255, 255, 0.06));
}

.sidebar-action-link.accent-pink {
    background: linear-gradient(135deg, rgba(255, 0, 160, 0.24), rgba(255, 255, 255, 0.06));
}

.sidebar-action-link.accent-yellow {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.26), rgba(255, 255, 255, 0.06));
    color: #fff7a8;
}

.sidebar-action-link.accent-cyan {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.24), rgba(255, 255, 255, 0.06));
}

.sidebar-action-link.admin-link,
.sidebar-action-link.logout-link {
    margin-top: 4px;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 2px 6px;
    border-radius: 2px;
    background: #fbff8a;
    color: #08115f;
    font-size: 0.72rem;
    font-weight: bold;
}

/* NEW·HOT·알림 상태는 둥근 글자 배지 대신 65KB 투명 이미지 아틀라스의 해당 셀만 표시합니다. */
.status-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-image: url('assets/images/community-status-atlas-v1.webp');
    background-repeat: no-repeat;
    background-size: 400% 200%;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,.38));
    transform-origin: 50% 70%;
}
.status-icon.is-new { width: 44px; height: 27px; background-position: 0 0; animation: statusNewFloat 1.45s ease-in-out infinite; }
.status-icon.is-hot { background-position: 33.333% 0; animation: statusHotFlame 1.15s ease-in-out infinite; }
.status-icon.is-talk { background-position: 66.666% 0; animation: statusTalkBounce 1.8s ease-in-out infinite; }
.status-icon.is-notice { background-position: 100% 0; animation: statusNoticeSwing 2.2s ease-in-out infinite; }
.status-icon.is-event { background-position: 0 100%; animation: statusEventPop 1.9s ease-in-out infinite; }
.status-icon.is-update { background-position: 33.333% 100%; animation: statusUpdateFlash 1.3s ease-in-out infinite; }
.status-icon.is-check { background-position: 66.666% 100%; animation: statusCheckTilt 2.4s ease-in-out infinite; }
@keyframes statusNewFloat { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-2px) scale(1.06); filter:drop-shadow(0 0 8px rgba(66,231,255,.72)); } }
@keyframes statusHotFlame { 0%,100% { transform:scale(.94) rotate(-1deg); } 50% { transform:scale(1.08) rotate(2deg); filter:drop-shadow(0 0 8px rgba(255,90,20,.68)); } }
@keyframes statusTalkBounce { 0%,100% { transform:translateY(0); } 45% { transform:translateY(-2px); } 70% { transform:translateY(-1px); } }
@keyframes statusNoticeSwing { 0%,100% { transform:rotate(-3deg); } 50% { transform:rotate(4deg); filter:drop-shadow(0 0 7px rgba(255,190,35,.62)); } }
@keyframes statusEventPop { 0%,100% { transform:scale(.96); } 50% { transform:scale(1.07); filter:drop-shadow(0 0 7px rgba(255,75,50,.62)); } }
@keyframes statusUpdateFlash { 0%,100% { transform:scale(.96); opacity:.88; } 45% { transform:scale(1.09); opacity:1; filter:drop-shadow(0 0 9px rgba(51,185,255,.85)); } }
@keyframes statusCheckTilt { 0%,100% { transform:rotate(-2deg); } 50% { transform:rotate(3deg); filter:drop-shadow(0 0 7px rgba(55,235,123,.6)); } }
@media (prefers-reduced-motion: reduce) { .status-icon { animation: none !important; } }

.login-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    text-align: left;
}

.save-id-check {
    width: auto !important;
    margin: 0 !important;
}

.save-id-label {
    color: #b8c8e6;
    font-size: 0.9em;
}

/* 메인으로 돌아가기 버튼 */
.btn-home {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.18), rgba(255, 255, 255, 0.05));
    color: #eef5ff;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    font-weight: 500;
    box-sizing: border-box;
}

.btn-home:hover {
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.28), rgba(255, 255, 255, 0.08));
    color: #ffffff;
    text-decoration: none;
}

/* 메인 콘텐츠 스타일 (확장) */
.content {
    flex: 1;
    min-width: 0;
    /* 사이드바가 줄어든 만큼 자동으로 넓어짐 */
}

/* 공용 배너 헤더: 일반 <header> 태그에는 적용하지 않고 site-hero를 명시한 페이지에만 사용합니다. */
.site-hero {
    background-color: #000000;
    padding: 40px 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    margin-bottom: 20px;
    text-align: center;
    /* 공용 헤더는 8MB 원본 배너 대신 웹용 경량 배너를 사용해 모든 페이지 첫 표시 속도를 높입니다. */
    background-image: url('images/banner-fast.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.site-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(6, 17, 95, 0.85), rgba(0, 0, 0, 0.78)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 24%);
    background-size: cover;
    z-index: 1;
}

.site-hero h1, .site-hero p {
    position: relative;
    z-index: 2;
}

.site-hero h1 {
    margin: 0;
    color: #fbff8a;
    font-size: clamp(2.2rem, 3vw, 3.3rem);
    letter-spacing: 0.08em;
    text-shadow: 0 0 24px rgba(251, 255, 138, 0.28);
    font-family: 'Orbitron', 'IBM Plex Sans KR', sans-serif;
    font-weight: 700;
}

.site-hero p {
    color: #eef4ff;
    margin-top: 10px;
    font-weight: 400;
    text-shadow: none;
    background-color: rgba(255, 255, 255, 0.08);
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
}

/* 탭 스타일 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
    gap: 10px;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #aab8d1;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 14px;
}

.tab-button.active {
    color: #0d1733;
    background: linear-gradient(135deg, #fbff8a, #7cf0ff);
    text-decoration: none;
}

.tab-button:hover {
    color: #ffffff;
}

.tab-content {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.tab-content.active {
    display: block;
}

.game-category h2 {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.24);
    padding-bottom: 10px;
    margin-top: 0;
    color: #f3f7ff;
    font-weight: 700;
}

.board-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.board-item {
    min-height: 68px;
    padding: 12px 10px;
    border: 1px dotted #aaaaaa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.board-item:last-child {
    border-bottom: none;
}

.board-item h3 {
    margin: 0;
    font-size: 1em;
    font-weight: normal; /* 굵기 제거 */
}

.board-item a::before {
    content: "■ "; /* 게시판 아이콘 */
    color: #ffff00;
}

@media (max-width: 1100px) {
    .board-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .board-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 배너 이미지 스타일 */
.board-banner {
    width: 100%;
    height: 60px;
    object-fit: cover;
    margin-bottom: 5px;
    border: 1px solid #fff;
}

/* 게시판 테이블 스타일 */
.board-container, .write-container, .view-container {
    background-color: #000084;
    border: 2px solid #ffffff;
    padding: 20px;
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.post-table th {
    background-color: #ffffff;
    color: #000084;
    padding: 8px;
    text-align: center;
    font-weight: normal; /* 굵기 제거 */
}

.post-table td {
    border-bottom: 1px dotted #aaaaaa;
    padding: 8px;
    text-align: center;
}

.post-table td.title {
    text-align: left;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
}

.board-header h2 {
    margin: 0;
    color: #ffff00;
    font-weight: normal; /* 굵기 제거 */
}

.btn-write, .btn-submit {
    background-color: #ffffff;
    color: #000084;
    padding: 5px 15px;
    text-decoration: none;
    font-weight: normal; /* 굵기 제거 */
    border: none;
    cursor: pointer;
}

.btn-write:hover, .btn-submit:hover {
    background-color: #ffff00;
}

textarea {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px;
    font-family: inherit;
    box-sizing: border-box;
}

/* 위젯 스타일 */
.widget-box, .recent-posts {
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 18px;
    backdrop-filter: blur(10px);
}

.widget-box h3, .recent-posts h3 {
    margin-top: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
    padding-bottom: 10px;
    color: #f6f9ff;
    font-size: 1.1em;
    font-weight: 700;
}

.widget-box ul, .recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-box li, .recent-posts li {
    padding: 8px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.16);
    font-size: 0.9em;
}

.widget-box li:last-child, .recent-posts li:last-child {
    border-bottom: none;
}

.widget-box a {
    color: #eef4ff;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', sans-serif;
}

.widget-box a:hover {
    color: #89ecff;
}

.widget-box .meta, .recent-posts .date {
    color: #8fb5ff;
    float: right;
    margin-left: 5px;
    font-size: 0.8em;
}

/* 레벨 뱃지 (텍스트 스타일로 변경) */
.level-badge {
    padding: 0 5px;
    border-radius: 0;
    font-size: 0.9em;
    font-weight: normal;
    margin-right: 5px;
    color: #ffffff;
    background: none !important; /* 배경 제거 */
    border: none !important; /* 테두리 제거 */
    box-shadow: none !important;
    text-shadow: none !important;
}

/* 뱃지 대신 텍스트 색상으로 등급 구분 */
.badge-bronze { color: #cd7f32; }
.badge-silver { color: #c0c0c0; }
.badge-gold { color: #ffff00; }
.badge-platinum { color: #00ced1; }
.badge-diamond { color: #00bfff; }
.badge-master { color: #da70d6; }
.badge-grandmaster { color: #ff75d8; }
.badge-challenger { color: #ff4500; font-weight: normal; /* 굵기 제거 */ }

/* 페이징 스타일 */
.pagination a {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    border: 1px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #ffffff;
    color: #000084;
    font-weight: normal; /* 굵기 제거 */
}

.pagination a.active {
    background-color: #ffff00;
    color: #000084;
    border-color: #ffff00;
    font-weight: normal; /* 굵기 제거 */
}

/* 검색창 스타일 */
.search-container {
    border-top: 1px dashed #ffffff;
    margin-top: 20px;
    padding-top: 20px;
}

.search-form select, .search-form input[type="text"] {
    background-color: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 5px;
}

.search-form button {
    background-color: #aaaaaa;
    color: #000000;
    border: 2px outset #ffffff;
    padding: 4px 10px;
}

/* 랭킹 페이지 스타일 */
.ranking-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ranking-box {
    flex: 1;
    background-color: #000084;
    border: 2px solid #ffffff;
    padding: 20px;
    min-width: 300px;
}

.ranking-box h3 {
    color: #ffff00;
    border-bottom: 1px dashed #ffffff;
    padding-bottom: 10px;
    margin-top: 0;
    text-align: center;
    font-weight: normal; /* 굵기 제거 */
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.rank-table th {
    background-color: #ffffff;
    color: #000084;
    padding: 8px;
    text-align: center;
    font-weight: normal; /* 굵기 제거 */
}

.rank-table td {
    border-bottom: 1px dotted #aaaaaa;
    padding: 8px;
    text-align: center;
}

.rank-table tr.top-rank td {
    font-weight: normal; /* 굵기 제거 */
    color: #ffff00;
}

.rank-num {
    display: inline-block;
    width: 20px;
    text-align: center;
}

.rank-1 { color: #ffd700; font-size: 1.2em; }
.rank-2 { color: #c0c0c0; font-size: 1.1em; }
.rank-3 { color: #cd7f32; font-size: 1.1em; }

/* 푸터 스타일 */
footer {
    background: rgba(6, 13, 28, 0.9);
    color: #8fa0be;
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9em;
    width: 100%;
    margin-top: auto;
}

/* 공통 풋터는 큰 빈 영역 대신 서비스 정체성과 저작권을 한 줄에 담는 얇은 하단 바를 사용합니다. */
footer.gamecc-site-footer {
    width: 100%;
    margin: 18px 0 0;
    padding: 0;
    border-top: 1px solid rgba(124, 240, 255, 0.26);
    background: linear-gradient(90deg, #02051a, #070d2c 50%, #02051a);
    color: #a9b8d7;
    box-sizing: border-box;
}

.gamecc-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1360px, calc(100% - 48px));
    min-height: 46px;
    margin: 0 auto;
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
}

.gamecc-footer-brand,
.gamecc-footer-services {
    display: flex;
    align-items: center;
}

.gamecc-footer-brand {
    gap: 7px;
    flex: 0 0 auto;
}

.gamecc-footer-brand strong {
    color: #fbff8a;
    font-family: 'Orbitron', 'NeoDunggeunmo', monospace;
    font-size: 0.83rem;
    letter-spacing: 0.08em;
}

.gamecc-footer-brand span,
.gamecc-footer-copy {
    color: #7184a8;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.gamecc-footer-services {
    justify-content: center;
    gap: 9px;
    color: #b9c8e5;
    font-size: 0.72rem;
    white-space: nowrap;
}

.gamecc-footer-services i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #57dff4;
    box-shadow: 0 0 7px rgba(87, 223, 244, 0.72);
}

.gamecc-footer-copy {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

/* 게임 화면 스타일 수정 */
.game-screen {
    flex: 1;
    border: 1px solid #aaaaaa;
    padding: 15px;
    overflow-y: auto;
    margin-bottom: 10px;
    background-color: #1a1a1a;
    line-height: 1.6;
    min-height: 300px; /* 최소 높이 증가 */
    max-height: 400px; /* 최대 높이 설정 */
}

/* 숫자 입력창 스핀 버튼 제거 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield; /* Firefox */
}

/* 상태바 스타일 개선 */
.status-bar {
    border-bottom: 1px dashed #ffffff;
    padding-bottom: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 1.3em; /* 폰트 크기 더 증가 */
    font-family: 'Verdana', 'Arial', sans-serif; /* 숫자 가독성 좋은 폰트 우선 적용 */
    flex-wrap: wrap;
    background-color: rgba(0, 0, 0, 0.5); /* 배경색 추가 */
    padding: 10px;
    border-radius: 5px;
}

.status-item {
    margin-right: 15px;
    padding: 2px 5px;
    background-color: rgba(255, 255, 255, 0.1); /* 항목별 배경 */
    border-radius: 3px;
    margin-bottom: 5px;
}

.stat-atk { color: #ff4500; font-weight: normal; /* 굵기 제거 */ }
.stat-def { color: #1e90ff; font-weight: normal; /* 굵기 제거 */ }
.stat-int { color: #da70d6; font-weight: normal; /* 굵기 제거 */ }

/* 공용 탭 버튼 */
.ansi-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.ansi-btn {
    flex: 1;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.06);
    color: #b8c6df;
    text-align: center;
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', sans-serif;
    cursor: pointer;
    position: relative;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    font-size: 1rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.ansi-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.ansi-btn.active {
    background: linear-gradient(135deg, #fbff8a, #7cf0ff);
    color: #08115f;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.ansi-btn span {
    text-shadow: none;
}
.ansi-btn.active span {
    text-shadow: none;
}

/* 채팅광장/자료실 전용 레트로 예외 테마 */
body.retro-theme {
    font-family: 'Gulim', 'DungGeunMo', 'Courier New', monospace;
    padding-top: 42px;
    background-color: #000084;
    background-image: linear-gradient(180deg, #000084 0%, #000042 100%);
    color: #ffffff;
    text-shadow: 1px 1px 0 #000000;
}

body.retro-theme .top-bar {
    min-height: 38px;
    background-color: #111;
    border-bottom: 1px solid #333;
    backdrop-filter: none;
    padding: 0 20px;
    font-family: 'Noto Sans KR', sans-serif;
}

body.retro-theme .top-bar a {
    color: #ccc;
    padding: 0;
    border-radius: 0;
}

body.retro-theme .top-bar a:hover {
    color: #fff;
    background: transparent;
    transform: none;
}

body.retro-theme a {
    color: #ffffff;
}

body.retro-theme a:hover {
    color: #ffff00;
    background-color: #000000;
}

body.retro-theme header {
    /* 자료실/채팅광장 설명 헤더 바로 아래에 공통 메뉴가 붙어 보여야 하므로 하단 여백을 제거합니다. */
    margin-bottom: 0;
}

body.retro-theme .content > header,
body.retro-theme .retro-header-block {
    background: #000084;
    border: 3px double #ffffff;
    box-shadow: 4px 4px 0 #000000;
    padding: 12px 16px;
}

body.retro-theme .content > header h1,
body.retro-theme .retro-header-title {
    margin: 0;
    color: #ffff00;
    font-family: 'NeoDunggeunmo', 'Gulim', monospace;
    font-size: 1.45rem;
    letter-spacing: 0.04em;
}

body.retro-theme .content > header p,
body.retro-theme .retro-header-meta {
    margin: 6px 0 0;
    color: #ffffff;
    font-family: 'NeoDunggeunmo', 'Gulim', monospace;
    font-size: 0.9rem;
}

body.retro-theme .retro-sysline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ffffff;
    color: #aaaaaa;
    font-family: 'NeoDunggeunmo', 'Gulim', monospace;
    font-size: 0.8rem;
}

body.retro-theme .retro-sysline strong {
    color: #00ff00;
}

body.retro-theme .sidebar {
    width: 220px;
    background: #000084;
    border: 2px solid #ffffff;
    border-radius: 0;
    box-shadow: none;
    padding: 10px;
    position: sticky;
    top: 58px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

body.retro-theme .login-section h3,
body.retro-theme .user-info h3,
body.retro-theme .widget-box h3,
body.retro-theme .widget-box h4 {
    color: #ffff00;
    border-bottom-color: #ffffff;
}

body.retro-theme .user-summary,
body.retro-theme .widget-box,
body.retro-theme .recent-posts {
    background: #000084;
    border: 2px solid #ffffff;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: 3px 3px 0 #000000;
}

body.retro-theme .login-section,
body.retro-theme .user-info {
    gap: 10px;
}

body.retro-theme .user-summary {
    padding: 12px 12px 10px;
    border-style: dashed;
    gap: 8px;
}

body.retro-theme .user-name {
    color: #ffffff;
    text-align: center;
    font-size: 1.08rem;
    padding-bottom: 6px;
    border-bottom: 1px dashed #ffffff;
}

body.retro-theme .user-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    gap: 10px;
    font-size: 0.92rem;
}

body.retro-theme .user-stat-row.points {
    padding-top: 8px;
    border-top: 1px dashed #ffffff;
}

body.retro-theme .user-stat-label,
body.retro-theme .user-points,
body.retro-theme .user-stat-value {
    color: inherit;
}

body.retro-theme .user-stat-value {
    text-align: right;
}

body.retro-theme .user-points {
    color: #ffff00;
}

body.retro-theme .sidebar-actions {
    display: grid;
    gap: 6px;
}

body.retro-theme .widget-box li,
body.retro-theme .recent-posts li {
    display: block;
    border-bottom-color: #aaaaaa;
    color: #ffffff;
    padding: 6px 0;
}

body.retro-theme .widget-box ul,
body.retro-theme .recent-posts ul {
    display: block;
}

body.retro-theme .widget-box a {
    color: #ffffff;
    font-family: 'Gulim', 'DungGeunMo', monospace;
}

body.retro-theme .widget-box a:hover {
    color: #ffff00;
}

body.retro-theme .sidebar-action-link,
body.retro-theme .btn-home {
    display: block;
    background: #000084;
    color: #ffff00;
    border: 2px solid #ffffff;
    border-radius: 0;
    box-shadow: 2px 2px 0 #000000;
    padding: 9px 10px;
    text-align: center;
    font-family: 'NeoDunggeunmo', 'Gulim', monospace;
    font-size: 0.92rem;
}

body.retro-theme .sidebar-action-link:hover,
body.retro-theme .btn-home:hover {
    background: #0000a0;
    color: #ffffff;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000000;
}

body.retro-theme .sidebar-action-link.accent-green {
    background: #008a3b;
    color: #ffffff;
}

body.retro-theme .sidebar-action-link.accent-pink {
    background: #a0006a;
    color: #ffffff;
}

body.retro-theme .sidebar-action-link.logout-link {
    background: #5d5d5d;
    color: #ffffff;
}

body.retro-theme .new-badge {
    background: #ffff00;
    color: #000084;
    border-radius: 0;
    padding: 1px 5px;
    min-width: auto;
}

/*
 * 데스크톱 내 정보 사이드 메뉴만 압축합니다.
 * 로그인 폼과 모바일 삼선 메뉴는 별도 구조이므로 영향받지 않으며, 긴 등급명·포인트도 카드 안에서 안전하게 표시됩니다.
 */
body .sidebar > .user-info {
    gap: 7px;
    font-size: 0.8rem;
}
body .sidebar > .user-info > h3 {
    margin: 0;
    padding-bottom: 5px;
    font-size: 0.92rem;
    line-height: 1.3;
}
body .sidebar > .user-info .user-summary {
    gap: 6px;
    padding: 9px;
    border-radius: 10px;
}
body .sidebar > .user-info .user-name {
    padding-bottom: 3px;
    font-size: 0.9rem;
    line-height: 1.3;
}
body .sidebar > .user-info .user-stat-row {
    gap: 5px;
    font-size: 0.76rem;
    line-height: 1.3;
}
body .sidebar > .user-info .user-stat-row.points {
    padding-top: 5px;
}
body .sidebar > .user-info .user-stat-value {
    min-width: 0;
}
body .sidebar > .user-info .level-badge {
    margin-right: 0;
    padding: 0;
    font-size: 0.76rem;
    white-space: nowrap;
}
body .sidebar > .user-info .user-points {
    font-size: 0.84rem;
    white-space: nowrap;
}
body .sidebar > .user-info .sidebar-actions {
    gap: 5px;
}
body .sidebar > .user-info .sidebar-action-link {
    min-height: 31px;
    margin-top: 0;
    padding: 6px 8px;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 0.78rem;
    line-height: 1.25;
}
body .sidebar > .user-info .new-badge {
    min-width: 28px;
    padding: 1px 4px;
    font-size: 0.61rem;
    line-height: 1.3;
}

body.retro-theme .ansi-tabs {
    border-bottom: 2px solid #fff;
    gap: 5px;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

body.retro-theme .ansi-btn {
    min-width: 0;
    background-color: #000084;
    color: #aaa;
    font-family: 'DungGeunMo', monospace;
    padding: 10px 5px;
    border: none;
    border-radius: 0;
    box-shadow: inset 2px 2px 0px #fff, inset -2px -2px 0px #000;
}

body.retro-theme .ansi-btn:hover {
    background-color: #0000a0;
    color: #fff;
    transform: none;
}

body.retro-theme .ansi-btn.active {
    background: #fff;
    color: #000084;
    box-shadow: inset 2px 2px 0px #000, inset -2px -2px 0px #fff;
}

body.retro-theme .ansi-btn span {
    text-shadow: 1px 1px 0 #000;
}

body.retro-theme .retro-screen {
    position: relative;
    background-color: #000084;
    color: #ffffff;
    font-family: 'NeoDunggeunmo', 'Gulim', monospace;
    border: 3px double #ffffff;
    box-shadow: 5px 5px 0 #000000;
}

body.retro-theme .retro-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        rgba(255,255,255,0.04) 0,
        rgba(255,255,255,0.04) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 0.45;
    pointer-events: none;
}

body.retro-theme .retro-menu-box {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid #ffff00;
}

body.retro-theme footer {
    background: #000000;
    color: #aaaaaa;
    border-top: 2px solid #ffffff;
}

/* 레트로 테마에서도 과한 흰 테두리 대신 메인의 네온 톤과 연결되는 얇은 풋터를 유지합니다. */
body.retro-theme footer.gamecc-site-footer {
    border-top: 1px solid rgba(124, 240, 255, 0.35);
    background: linear-gradient(90deg, #00020e, #040a28 50%, #00020e);
}

@media (max-width: 700px) {
    footer.gamecc-site-footer {
        margin-top: 12px;
    }

    .gamecc-footer-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 12px;
        width: min(100% - 24px, 560px);
        min-height: 0;
        padding: 10px 0;
    }

    .gamecc-footer-services {
        order: 3;
        width: 100%;
        gap: 7px;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .gamecc-footer-services::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 900px) {
    body.retro-theme {
        padding-top: 92px;
    }

    body.retro-theme .top-bar {
        padding: 6px 12px;
    }

    body.retro-theme .sidebar {
        width: 100%;
        position: static;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* 텍스트 이펙트 애니메이션 */
@keyframes rainbow {
    0% { color: #ff0000; }
    14% { color: #ff7f00; }
    28% { color: #ffff00; }
    42% { color: #00ff00; }
    57% { color: #0000ff; }
    71% { color: #4b0082; }
    85% { color: #9400d3; }
    100% { color: #ff0000; }
}
.rainbow-text {
    animation: rainbow 2s linear infinite;
    font-weight: bold;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
.shake-text {
    display: inline-block;
    animation: shake 0.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.pulse-text {
    display: inline-block;
    animation: pulse 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
.blink-text {
    animation: blink 1s infinite;
}

/* 전체 페이지 공통 상단 영역 최종 고정 규칙
   - 일부 레트로/게임/자료실 페이지가 자체 .top-bar 크기를 다시 지정해 홈과 다르게 보이던 문제를 방지합니다.
   - 모든 페이지의 전광판과 상단 메뉴는 홈 화면 기준 높이/간격/폰트를 유지합니다. */
body,
body.retro-theme {
    padding-top: 56px !important;
}

body .top-bar,
body.retro-theme .top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-height: 50px !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    z-index: 1000 !important;
    background: rgba(6, 13, 28, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px) !important;
    font-family: 'IBM Plex Sans KR', 'Noto Sans KR', sans-serif !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    text-shadow: none !important;
}

body .top-bar a,
body.retro-theme .top-bar a {
    color: #c7d2e7 !important;
    margin-right: 10px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease !important;
}

body .top-bar a:hover,
body.retro-theme .top-bar a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px) !important;
}

body .top-bar .left-menu,
body .top-bar .right-menu,
body.retro-theme .top-bar .left-menu,
body.retro-theme .top-bar .right-menu {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

/*
 * 모바일 서랍을 위해 top-bar-navigation을 display: contents로 바꾸면서
 * DOM 순서가 "좌측 메뉴 → 우측 메뉴 → 전광판"이 되었습니다.
 * 데스크톱은 기존과 같이 "좌측 메뉴 → 전광판 → 우측 메뉴" 순서여야
 * 전광판이 화면 중앙에 남으므로 flex 순서를 명시적으로 고정합니다.
 * 700px 이하에서는 아래의 모바일 grid 규칙이 별도로 전광판 위치를 담당합니다.
 */
body .top-bar > .top-bar-navigation > .left-menu,
body.retro-theme .top-bar > .top-bar-navigation > .left-menu {
    order: 1;
}

body .top-bar > .marquee-container,
body.retro-theme .top-bar > .marquee-container {
    order: 2;
}

body .top-bar > .top-bar-navigation > .right-menu,
body.retro-theme .top-bar > .top-bar-navigation > .right-menu {
    order: 3;
}

body .marquee-container,
body.retro-theme .marquee-container {
    flex: 1 1 auto !important;
    max-width: 850px !important;
    min-width: 180px !important;
    height: 34px !important;
    margin: 0 20px !important;
}

body .marquee-board,
body.retro-theme .marquee-board {
    height: 100% !important;
    border: 2px solid #333 !important;
    border-radius: 6px !important;
    background-color: #000000 !important;
}

body .marquee-msg,
body.retro-theme .marquee-msg {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* 공통 메뉴만 단독 배치되는 상세/게임 페이지용 래퍼입니다. 홈의 content 폭과 같은 기준을 사용합니다. */
.gamecc-page-menu-shell {
    width: 100%;
    max-width: var(--gamecc-layout-max);
    margin: 0 auto;
    padding: var(--gamecc-layout-top) var(--gamecc-layout-inline) 0;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    body,
    body.retro-theme {
        padding-top: 112px !important;
    }

    body .top-bar,
    body.retro-theme .top-bar {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        padding: 6px 12px !important;
    }

    body .top-bar .left-menu,
    body .top-bar .right-menu,
    body.retro-theme .top-bar .left-menu,
    body.retro-theme .top-bar .right-menu {
        flex-wrap: wrap !important;
    }

    body .marquee-container,
    body.retro-theme .marquee-container {
        order: 3 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 30px !important;
        margin: 8px 0 !important;
    }

    body .marquee-msg,
    body.retro-theme .marquee-msg {
        font-size: 15px !important;
    }
}

@media (max-width: 640px) {
    .gamecc-page-menu-shell {
        padding: 16px 12px 0;
    }
}

/*
 * 공통 모바일 사이드 메뉴입니다.
 * 데스크톱에서는 navigation 래퍼를 투명하게 만들어 기존 좌측 메뉴·전광판·우측 메뉴 순서를 그대로 유지합니다.
 */
.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-menu-title,
.mobile-profile-menu {
    display: none;
}

.top-bar-navigation {
    display: contents;
}

/* 데스크톱 상단은 좌·중앙·우측의 균형 열을 사용해 전광판이 화면 정중앙에 고정되게 합니다. */
@media (min-width: 901px) {
    body .top-bar,
    body.retro-theme .top-bar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(320px, 40vw, 850px) minmax(0, 1fr) !important;
        align-items: center !important;
    }
    body .top-bar > .top-bar-navigation > .left-menu,
    body.retro-theme .top-bar > .top-bar-navigation > .left-menu {
        grid-column: 1;
        justify-self: start;
    }
    body .top-bar > .marquee-container,
    body.retro-theme .top-bar > .marquee-container {
        grid-column: 2;
        width: 100% !important;
        max-width: 850px !important;
        margin: 0 !important;
        justify-self: center;
    }
    body .top-bar > .top-bar-navigation > .right-menu,
    body.retro-theme .top-bar > .top-bar-navigation > .right-menu {
        grid-column: 3;
        justify-self: end;
    }
}

/* 모바일 로그인창은 기본적으로 렌더링하지 않고 삼선 메뉴의 로그인 버튼을 눌렀을 때만 표시합니다. */
.mobile-login-modal[hidden] {
    display: none !important;
}

/*
 * 휴대폰 전용 공통 골격입니다.
 * 기존에는 900px 이하에서 사이드바만 static으로 바뀌고 .container의 가로 flex가 유지되어,
 * 본문이 매우 좁아지거나 가로 스크롤이 생길 수 있었습니다. 모바일에서는 사이드바와 본문을
 * 반드시 세로 흐름으로 전환하고, 상단바는 내용 높이를 자동으로 확보하는 sticky 구조로 바꿉니다.
 */
@media (max-width: 700px) {
    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    /* 로그인창이 열린 동안 뒤쪽 문서만 고정하며 로그인 패널 자체는 작은 화면에서도 세로 스크롤할 수 있습니다. */
    body.is-mobile-login-open {
        overflow: hidden;
    }

    .mobile-login-modal:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 5000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        box-sizing: border-box;
    }
    .mobile-login-modal__backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(0, 4, 18, .82);
        backdrop-filter: blur(5px);
    }
    .mobile-login-modal__panel {
        position: relative;
        width: min(100%, 420px);
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        padding: 20px;
        border: 1px solid #69dfff;
        border-radius: 12px;
        box-sizing: border-box;
        background: linear-gradient(180deg, #0a2550, #030b21);
        box-shadow: 0 22px 60px rgba(0, 0, 0, .66), inset 0 0 0 1px rgba(255, 255, 255, .06);
        color: #fff;
    }
    .mobile-login-modal__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 12px;
        border-bottom: 1px dashed rgba(124, 240, 255, .35);
    }
    .mobile-login-modal__header small {
        color: #7cf0ff;
        font-size: .68rem;
        letter-spacing: .08em;
    }
    .mobile-login-modal__header h2 {
        margin: 4px 0 0;
        color: #fff;
        font-size: 1.35rem;
    }
    .mobile-login-modal__close {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 7px;
        background: rgba(255, 255, 255, .08);
        color: #fff;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }
    .mobile-login-modal__form {
        display: grid;
        gap: 8px;
    }
    .mobile-login-modal__form > label:not(.mobile-login-modal__save) {
        color: #cce9ff;
        font-size: .8rem;
        font-weight: 700;
    }
    .mobile-login-modal__form > input:not([type="hidden"]) {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 10px 12px;
        border: 1px solid rgba(124, 240, 255, .38);
        border-radius: 8px;
        box-sizing: border-box;
        background: rgba(0, 5, 20, .8);
        color: #fff;
        font-size: 16px;
        outline: none;
    }
    .mobile-login-modal__form > input:focus {
        border-color: #fbff8a;
        box-shadow: 0 0 0 3px rgba(251, 255, 138, .12);
    }
    .mobile-login-modal__save {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 34px;
        color: #dceaff;
        font-size: .82rem;
        cursor: pointer;
    }
    .mobile-login-modal__save input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #69dfff;
    }
    .mobile-login-modal__submit {
        width: 100%;
        min-height: 46px;
        margin-top: 4px;
        border: 0;
        border-radius: 8px;
        background: linear-gradient(135deg, #7cf0ff, #8fa9ff);
        color: #07133c;
        font-size: .96rem;
        font-weight: 900;
        cursor: pointer;
    }
    .mobile-login-modal__links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }
    .mobile-login-modal__links a {
        min-width: 0;
        padding: 9px 6px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 7px;
        color: #dbeaff;
        font-size: .75rem;
        text-align: center;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    /*
     * 회원 전용 사이드바는 모바일 삼선 메뉴의 내 정보와 기능이 중복됩니다.
     * #userInfo를 직접 가진 사이드바만 숨기므로, 게시판·채팅 등의 독립 사이드 패널은 유지됩니다.
     */
    .sidebar:has(> #userInfo) {
        display: none !important;
    }

    body,
    body.retro-theme {
        /* fixed 상단바의 임의 높이를 추정하지 않고 sticky 상단바가 실제 공간을 차지하게 합니다. */
        padding-top: 0 !important;
    }

    body .top-bar,
    body.retro-theme .top-bar {
        position: sticky !important;
        top: 0;
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center !important;
        gap: 8px;
        min-height: 48px !important;
        padding: 5px 10px !important;
    }

    /* 닫힌 상태에는 삼선 버튼과 전광판만 남겨 본문·채팅 영역의 세로 공간을 확보합니다. */
    .mobile-menu-toggle {
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
        width: 36px;
        height: 36px;
        padding: 8px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        border: 1px solid rgba(151, 238, 255, 0.56);
        border-radius: 7px;
        background: #0a2142;
        cursor: pointer;
        z-index: 1102;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 17px;
        height: 2px;
        background: #8cefff;
        box-shadow: 0 0 4px rgba(92, 238, 255, 0.6);
        transition: transform .18s ease, opacity .18s ease;
    }
    .top-bar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .top-bar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    .top-bar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .mobile-menu-title {
        /* 전광판이 서비스명보다 우선이므로 모바일에서는 별도 제목을 표시하지 않습니다. */
        display: none;
    }

    /* 메뉴 바깥을 터치하면 닫히는 배경입니다. 열렸을 때만 클릭을 받도록 pointer-events를 분리합니다. */
    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        top: 48px;
        right: 0;
        bottom: 0;
        left: 0;
        border: 0;
        background: rgba(0, 4, 16, 0.66);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 1100;
    }
    .top-bar.is-mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* 홈·서비스·내 정보 링크만 세로 서랍으로 구성하고, 전광판은 헤더에 고정 유지합니다. */
    body .top-bar .top-bar-navigation,
    body.retro-theme .top-bar .top-bar-navigation {
        display: flex !important;
        position: fixed;
        /* 헤더와 전광판 아래에서 시작해 열린 메뉴가 전광판을 가리지 않게 합니다. */
        top: 48px;
        left: 0;
        width: min(320px, 86vw);
        height: calc(100dvh - 48px);
        min-height: calc(100dvh - 48px);
        flex-direction: column;
        align-items: stretch !important;
        gap: 0;
        padding: 14px 12px 18px;
        overflow-y: auto;
        border-right: 1px solid #527cc9;
        background: linear-gradient(180deg, #081a39, #030a1d);
        box-shadow: 8px 0 24px rgba(0, 0, 0, .52);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .22s ease, visibility .22s step-end;
        z-index: 1101;
    }
    body .top-bar.is-mobile-menu-open .top-bar-navigation,
    body.retro-theme .top-bar.is-mobile-menu-open .top-bar-navigation {
        transform: translateX(0);
        visibility: visible;
        transition: transform .22s ease, visibility 0s;
    }

    /* 긴 메뉴는 줄바꿈으로 상단바를 과도하게 키우지 않고 가로 스크롤로 모두 접근할 수 있게 합니다. */
    body .top-bar .top-bar-navigation .left-menu,
    body .top-bar .top-bar-navigation .right-menu,
    body.retro-theme .top-bar .top-bar-navigation .left-menu,
    body.retro-theme .top-bar .top-bar-navigation .right-menu {
        width: 100%;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        flex-direction: column;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        overflow: visible;
    }

    /*
     * 회원 기능은 삼선 메뉴를 열자마자 가장 먼저 찾는 영역입니다.
     * 서비스 링크 위로 올려 작은 휴대폰에서도 스크롤 없이 '내 정보'를 즉시 누를 수 있게 합니다.
     */
    body .top-bar .top-bar-navigation .left-menu { order: 2; }
    body .top-bar .top-bar-navigation .right-menu {
        order: 1;
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        border-bottom: 1px dashed rgba(142, 216, 255, .35);
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    /* 상단 전광판은 메뉴 여닫기와 무관하게 헤더 오른쪽 칸에 계속 남습니다. */
    body .top-bar > .marquee-container,
    body.retro-theme .top-bar > .marquee-container {
        display: block !important;
        grid-column: 2;
        grid-row: 1;
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: 30px !important;
        margin: 0 !important;
        position: relative;
        z-index: 1103;
    }
    body .top-bar .top-bar-navigation a,
    body.retro-theme .top-bar .top-bar-navigation a {
        width: 100%;
        margin: 0 !important;
        padding: 10px 11px !important;
        border-radius: 6px !important;
        font-size: .86rem !important;
        white-space: nowrap;
    }

    /* 모바일에서는 계정 바로가기들을 기본 노출하지 않고, 삼선 메뉴 안의 '내 정보'만 사용합니다. */
    body .top-bar .top-bar-navigation .desktop-account-link,
    body.retro-theme .top-bar .top-bar-navigation .desktop-account-link,
    body .top-bar .top-bar-navigation .desktop-profile-link,
    body.retro-theme .top-bar .top-bar-navigation .desktop-profile-link {
        display: none !important;
    }
    body .top-bar .top-bar-navigation .mobile-profile-menu,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-menu {
        display: block;
        width: 100%;
        margin: 0;
        border: 1px solid rgba(142, 216, 255, .28);
        border-radius: 6px;
        background: rgba(0, 18, 55, .48);
        overflow: hidden;
    }
    body .top-bar .top-bar-navigation .mobile-profile-menu summary,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-menu summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 11px;
        color: #d9faff;
        font-size: .86rem;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }
    body .top-bar .top-bar-navigation .mobile-profile-menu summary small,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-menu summary small {
        margin-left: auto;
        margin-right: 8px;
        color: #8ab6d8;
        font-size: .67rem;
        font-weight: 400;
    }
    body .top-bar .top-bar-navigation .mobile-profile-menu summary::-webkit-details-marker { display: none; }
    body .top-bar .top-bar-navigation .mobile-profile-menu summary::after { content: '＋'; color: #8cefff; font-size: 1.1rem; }
    body .top-bar .top-bar-navigation .mobile-profile-menu[open] summary { border-bottom: 1px dashed rgba(142, 216, 255, .35); }
    body .top-bar .top-bar-navigation .mobile-profile-menu[open] summary::after { content: '－'; color: #ffff00; }
    body .top-bar .top-bar-navigation .mobile-profile-menu a,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-menu a {
        display: block;
        width: 100%;
        padding-left: 21px !important;
        color: #9feeff !important;
        background: rgba(0, 0, 0, .16) !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(142, 216, 255, .14);
    }
    /* 레벨과 포인트는 링크처럼 보이지 않는 상태 정보로 분리해 오작동을 막고 가독성을 높입니다. */
    body .top-bar .top-bar-navigation .mobile-profile-status,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-status {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px;
        background: rgba(0, 0, 0, .28);
        border-bottom: 1px dashed rgba(142, 216, 255, .35);
    }
    body .top-bar .top-bar-navigation .mobile-profile-status span,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-status span {
        min-width: 0;
        padding: 7px 6px;
        border: 1px solid rgba(141, 232, 255, .22);
        border-radius: 4px;
        color: #b7d4e9;
        font-size: .72rem;
        text-align: center;
        white-space: nowrap;
    }
    body .top-bar .top-bar-navigation .mobile-profile-status b,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-status b {
        display: block;
        margin-top: 3px;
        overflow: hidden;
        color: #ffff70;
        font-size: .82rem;
        text-overflow: ellipsis;
    }
    body .top-bar .top-bar-navigation .mobile-profile-menu .mobile-logout-link,
    body.retro-theme .top-bar .top-bar-navigation .mobile-profile-menu .mobile-logout-link {
        color: #ffb7bd !important;
        border-bottom: 0;
    }

    .container {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        min-height: 0;
        padding: 14px 12px 76px;
    }

    .sidebar,
    body.retro-theme .sidebar {
        width: 100%;
        max-width: none;
        margin: 0 0 14px;
        padding: 12px;
        box-sizing: border-box;
        position: static;
        max-height: none;
        overflow: visible;
    }

    .content {
        width: 100%;
        min-width: 0;
    }

    .tabs {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .tab-button {
        flex: 0 0 auto;
        min-width: 118px;
    }

    /*
     * 전체 사용자 페이지 공통 모바일 안전 규칙입니다.
     * 게시글, 자료실, 프로필, 랭킹 등 개별 화면이 서로 다른 HTML을 사용해도
     * 긴 미디어·폼·표가 화면 폭을 밀어내지 않도록 최종 폭을 일관되게 제한합니다.
     */
    main,
    .content,
    .retro-screen,
    .board-container,
    .view-container,
    .write-container,
    .upload-container,
    .profile-container,
    .message-container,
    .msg-container {
        min-width: 0;
        max-width: 100%;
    }

    img,
    video,
    audio,
    iframe,
    embed,
    object {
        max-width: 100%;
    }

    textarea,
    input:not([type="checkbox"]):not([type="radio"]),
    select {
        max-width: 100%;
    }

    pre,
    code {
        overflow-wrap: anywhere;
    }

    /* 표는 글자를 억지로 겹치게 하지 않고 필요한 경우 해당 영역 안에서만 가로 스크롤됩니다. */
    .post-table,
    .board-table,
    .ranking-table,
    .rank-table,
    .message-table,
    .msg-list,
    .data-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal {
        padding: 12px;
        overflow-y: auto;
    }

    .modal-content {
        width: min(100%, 520px) !important;
        max-width: 100%;
        margin: 12px auto !important;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }

    /* Summernote 도구 모음은 줄바꿈해 배치합니다. overflow 스크롤을 쓰면 색상 팝업까지 잘리므로 사용하지 않습니다. */
    .note-editor.note-frame {
        max-width: 100%;
    }

    .note-editor .note-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
        overflow: visible;
        white-space: normal;
    }

    .note-editor .note-toolbar .note-btn-group {
        float: none;
        display: inline-flex;
        margin: 0;
    }
}

/* 공개 화면의 외곽 크기만 통일합니다. 운영 도구와 삽입 모달의 독립 크기는 건드리지 않습니다.
   페이지별 스타일 뒤에도 같은 폭을 유지하도록 크기 속성에만 공통 우선순위를 적용합니다. */
body:not(.admin-page):not(.board-manage-modal-view) > .container {
    width: 100% !important;
    max-width: var(--gamecc-layout-max) !important;
    margin-inline: auto !important;
    padding: var(--gamecc-layout-top) var(--gamecc-layout-inline) var(--gamecc-layout-bottom) !important;
    gap: var(--gamecc-layout-gap) !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    flex-direction: row !important;
    align-items: flex-start !important;
}
body:not(.admin-page):not(.board-manage-modal-view) > .container > .sidebar {
    /* 200픽셀 본문에 안쪽 여백·테두리를 더한 기존 게임시세의 외곽 226픽셀을 보존합니다. */
    box-sizing: border-box !important;
    width: var(--gamecc-sidebar-width) !important;
    max-width: 100% !important;
    min-width: 0;
    flex: 0 0 var(--gamecc-sidebar-width) !important;
    margin: 0 !important;
    padding: 12px !important;
}
body:not(.admin-page):not(.board-manage-modal-view) > .container > .content {
    width: auto !important;
    min-width: 0;
    flex: 1 1 0%;
    box-sizing: border-box;
}
/* 오락실 게임방은 회원 메뉴와 접속 현황을 한 열로 묶으므로 그 바깥 열에 같은 폭을 적용합니다. */
body:not(.admin-page) > .container > .arcade-room-left-rail {
    width: var(--gamecc-sidebar-width) !important;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 var(--gamecc-sidebar-width) !important;
    margin: 0 !important;
    box-sizing: border-box;
}
body:not(.admin-page) > .gamecc-page-menu-shell {
    width: 100% !important;
    max-width: var(--gamecc-layout-max) !important;
    margin-inline: auto !important;
    padding: var(--gamecc-layout-top) var(--gamecc-layout-inline) 0 !important;
    box-sizing: border-box !important;
}
/* 메뉴가 본문 밖에 있는 검색·상세·회원 기능도 사이드바 옆 본문의 시작선에 맞춥니다. */
body:not(.admin-page) > .gamecc-page-menu-shell:has(+ .container > :is(.sidebar, .arcade-room-left-rail)) {
    padding-left: calc(var(--gamecc-layout-inline) + var(--gamecc-sidebar-width) + var(--gamecc-layout-gap)) !important;
}
/* 대국실·단독 게임은 바깥 정렬만 맞추고 실제 게임판과 채팅 영역의 크기 계산은 유지합니다. */
body:not(.board-game-embed) > :is(.game-room-shell.container-flex, .janggi-shell, .arcade-play-shell) {
    width: min(calc(var(--gamecc-layout-max) - var(--gamecc-layout-inline) - var(--gamecc-layout-inline)), calc(100% - var(--gamecc-layout-inline) - var(--gamecc-layout-inline))) !important;
    max-width: none;
    margin-inline: auto !important;
    box-sizing: border-box;
}
body:not(.admin-page) .gamecc-footer-inner {
    width: min(calc(var(--gamecc-layout-max) - var(--gamecc-layout-inline) - var(--gamecc-layout-inline)), calc(100% - var(--gamecc-layout-inline) - var(--gamecc-layout-inline)));
}
@media (max-width: 980px) {
    :root { --gamecc-layout-inline: 20px; --gamecc-sidebar-width: 186px; }
}
@media (max-width: 700px) {
    :root {
        --gamecc-layout-inline: 12px;
        --gamecc-layout-top: 12px;
        --gamecc-layout-bottom: 30px;
        --gamecc-layout-gap: 16px;
    }
    body:not(.admin-page):not(.board-manage-modal-view) > .container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    body:not(.admin-page):not(.board-manage-modal-view) > .container > .sidebar {
        width: 100% !important;
        flex: 0 0 auto !important;
    }
    body:not(.admin-page) > .container > .arcade-room-left-rail {
        width: 100% !important;
        flex: 0 0 auto !important;
    }
    body:not(.admin-page) > .gamecc-page-menu-shell:has(+ .container > :is(.sidebar, .arcade-room-left-rail)) {
        padding-left: var(--gamecc-layout-inline) !important;
    }
}
