:root{
  --bg: #E9ECEF;
  --panel: #E9ECEF;
  --panel-alt: #DFE3E7;
  --border: transparent;
  --text: #363B42;
  --muted: #82878F;
  --muted-2: #A7ACB4;

  --music: #3182F6;
  --music-hover: #1B64DA;
  --admin: #E14545;
  --special: #6F5CE0;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --sh-light: 255,255,255;
  --sh-dark: 163,170,181;
  --shadow-sm: -6px -6px 14px rgba(var(--sh-light),0.75), 6px 6px 14px rgba(var(--sh-dark),0.45);
  --shadow-md: -10px -10px 22px rgba(var(--sh-light),0.8), 10px 10px 26px rgba(var(--sh-dark),0.5);
  --shadow-inset: inset -5px -5px 10px rgba(var(--sh-light),0.6), inset 5px 5px 10px rgba(var(--sh-dark),0.4);
  --shadow-inset-sm: inset -3px -3px 6px rgba(var(--sh-light),0.6), inset 3px 3px 6px rgba(var(--sh-dark),0.4);
  --panel-glass: rgba(233,236,239,0.97);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #2B2E33;
    --panel: #2B2E33;
    --panel-alt: #24262B;
    --text: #EDEFF2;
    --muted: #9297A0;
    --muted-2: #5E636B;

    --music: #4B93FA;
    --music-hover: #6FA8FB;
    --admin: #FF6B6B;
    --special: #9B87F5;

    --sh-light: 62,66,73;
    --sh-dark: 0,0,0;
    --shadow-sm: -6px -6px 14px rgba(var(--sh-light),0.6), 6px 6px 16px rgba(var(--sh-dark),0.45);
    --shadow-md: -10px -10px 22px rgba(var(--sh-light),0.65), 10px 10px 28px rgba(var(--sh-dark),0.55);
    --shadow-inset: inset -5px -5px 10px rgba(var(--sh-light),0.5), inset 5px 5px 10px rgba(var(--sh-dark),0.5);
    --shadow-inset-sm: inset -3px -3px 6px rgba(var(--sh-light),0.5), inset 3px 3px 6px rgba(var(--sh-dark),0.5);
    --panel-glass: rgba(43,46,51,0.97);
  }
}
*{box-sizing:border-box;}
body{ margin:0; background:var(--bg); color:var(--text); font-family:'SUIT Variable', 'Pretendard', sans-serif; font-size:15px; letter-spacing:-0.2px; line-height:1.55; -webkit-font-smoothing: antialiased; display:flex; flex-direction:column; min-height:100vh; overflow-x:hidden;}
.display{font-family:'SUIT Variable', 'Pretendard', sans-serif; font-weight:800; letter-spacing:-1px;}
a{color:inherit; text-decoration:none;}
.tabular{font-variant-numeric:tabular-nums;}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--music); outline-offset: 2px; border-radius: 2px;
}

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:var(--bg); }
::-webkit-scrollbar-thumb{ background:var(--muted-2); border-radius:10px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background:var(--muted); }

header{ background:var(--panel-glass); backdrop-filter:saturate(180%) blur(10px); -webkit-backdrop-filter:saturate(180%) blur(10px); position:sticky; top:0; z-index:50; box-shadow: 0 8px 20px rgba(var(--sh-dark),0.12);}
.header-inner{ max-width:1180px; margin:0 auto; padding:14px 20px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;}
.brand{ font-size:20px; white-space:nowrap; cursor:pointer; transition:opacity 0.2s; display:flex; align-items:center; gap:20px; }
.brand:hover{ opacity:0.85; }
.logo-badge{ display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:var(--radius-sm); background:var(--panel); box-shadow:var(--shadow-sm); flex:none; }

.brand-word{ display:inline-flex; align-items:baseline; gap:2px; }
.bw-group{ display:inline-flex; align-items:baseline; flex:none; }
.bw-slot{ width:21.14px; }
.bw-big{ color:var(--music); font-weight:900; font-size:1.15em; }
.bw-big.bw-kr{ color:var(--muted); }
.bw-small{ font-weight:300; font-size:10px; color:var(--muted); margin-left:1px; }

.search{ flex:1; display:flex; max-width:420px; background:var(--bg); border-radius:999px; overflow:hidden; box-shadow:var(--shadow-inset-sm); transition:box-shadow 0.2s;}
.search input{ flex:1; background:none; border:none; outline:none; color:var(--text); padding:10px 8px 10px 18px; font-size:13px; font-family:inherit; min-width:0;}
.search button{ border:none; background:var(--panel); color:var(--text); padding:0 18px; margin:4px; border-radius:999px; cursor:pointer; font-family:inherit; font-weight:600; transition:0.2s; white-space:nowrap; box-shadow:var(--shadow-sm);}
.search button:hover { color:var(--music); }
.search button:active { box-shadow:var(--shadow-inset-sm); }

.user-actions { display:flex; align-items:center; gap:14px; white-space:nowrap; }
.auth-btn { background:none; border:none; color:var(--text); cursor:pointer; font-size:13px; font-family:inherit; font-weight:600; padding:0; transition:0.2s;}
.auth-btn:hover { color:var(--music); }

.write-btn{ background:var(--music); color:#fff; font-weight:700; border:none; padding:10px 20px; cursor:pointer; font-size:13px; border-radius:999px; font-family:inherit; transition:0.2s; box-shadow:var(--shadow-sm);}
.write-btn:hover { background:var(--music-hover); }
.write-btn:active { box-shadow:var(--shadow-inset); }

.shell{ max-width:1180px; margin:0 auto; padding:20px; display:grid; grid-template-columns:230px 1fr; gap:24px; flex:1; width:100%; box-sizing:border-box;}
.shell > * { min-width: 0; }

.sidebar{ background:var(--panel); align-self:start; border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:6px; will-change:transform;}
.cat-group{ margin-bottom:6px; }
.cat-group:last-child{ margin-bottom:0; }
.cat-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px 6px; font-weight:700; font-size:12.5px; color:var(--muted);}
.board-list{list-style:none; margin:0; padding:2px 0;}
.board-list li a{ display:block; margin:2px 6px; padding:9px 12px; border-radius:var(--radius-sm); font-size:13px; color:var(--muted); transition:0.15s;}
.board-list li a:hover{ color:var(--text); }
.board-list li a.active{color:var(--music); background:var(--panel); font-weight:700; box-shadow:var(--shadow-inset-sm);}

/* 핫게시판(위젯) 영역 : PC에서는 캐러셀처럼 가로 스크롤 */
.widget-container { display:flex; gap:16px; margin:0 -20px 10px; padding:22px 20px; overflow-x:auto; scroll-snap-type:x mandatory;}
.widget-card { flex:1; min-width:220px; max-width:100%; scroll-snap-align:start; background:var(--panel); padding:16px; border-radius:var(--radius-lg); cursor:pointer; transition:transform 0.2s, box-shadow 0.2s; position:relative; box-sizing:border-box; box-shadow:var(--shadow-sm);}
.widget-card:hover { transform:translateY(-3px); }
.hot-badge { color:var(--music); font-weight:800; font-size:12px; margin-bottom:8px; display:inline-block;}
.widget-title { font-weight:600; font-size:14.5px; color:var(--text); margin-bottom:8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.4; word-break:break-all;}
.widget-stats { font-size:12px; color:var(--muted); display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.board-title-row{ display:flex; align-items:center; justify-content:space-between; margin:0 0 14px; flex-wrap:wrap; gap:12px; }
.board-title-row h1{ font-size:19px; margin:0; font-weight:700; }

.sort-btns { display:flex; gap:10px; font-size:13px; align-items:center; flex-wrap:wrap;}
.sort-btns button { background:none; border:none; color:var(--muted); font-size:13px; font-weight:600; cursor:pointer; padding:0; font-family:inherit; transition:0.2s; white-space:nowrap; }
.sort-btns button.active { color:var(--music); font-weight:800; }
.sort-btns button:hover { color:var(--text); }

/* 게시판 태그(말머리) 뱃지 */
.tag{ display:inline-block; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; background:var(--panel-alt); color:var(--muted); white-space:nowrap; }

/* 야구게시판 응원팀 뱃지 (닉네임 옆) */
.team-badge{ display:inline-block; font-size:11px; font-weight:800; padding:1px 7px; border-radius:10px; margin-left:6px; color:#fff; white-space:nowrap; vertical-align:middle; }

/* 야구게시판 팀별 탭 (FM코리아 스타일) */
#baseballTeamTabs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.team-tab-btn{ background:var(--panel); border:none; color:var(--muted); padding:8px 18px; border-radius:999px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit; transition:0.2s; box-shadow:var(--shadow-sm); }
.team-tab-btn:hover{ color:var(--text); }
.team-tab-btn.active{ background:var(--team-color, var(--music)); color:#fff; box-shadow:var(--shadow-inset-sm); }

/* 게시판 테이블 */
.post-table-wrap { width:100%; box-sizing:border-box; background:var(--panel); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.table-scroll { overflow-x:auto; overflow-y:hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.dc-table { width:100%; border-collapse:collapse; text-align:center; min-width:650px; }
.dc-table th { background:transparent; color:var(--muted); font-weight:600; padding:14px 0; font-size:12.5px; }
.dc-table td { padding:12px 0; vertical-align:middle; font-size:13px; color:var(--text); }
.dc-table tbody tr { transition:background 0.15s; cursor:pointer; }
.dc-table tbody tr:hover { background:var(--panel-alt); }

.col-id { width: 8%; color:var(--muted); }
.col-category { width: 12%; }
.col-title { width: auto; text-align:left; padding-left:14px !important; }
.col-author { width: 12%; color:var(--muted); }
.col-date { width: 10%; color:var(--muted); }
.col-views { width: 8%; color:var(--muted); }
.col-likes { width: 8%; color:var(--muted); }

.dc-title-link { color:var(--text); text-decoration:none; }
.dc-title-link:hover { color:var(--music); text-decoration:underline; }
.dc-comment-count { color:var(--special); font-weight:bold; font-size:11px; margin-left:5px; }

/* 하단 컨트롤 */
.board-footer { margin-top: 20px; padding: 6px 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; width:100%; box-sizing:border-box; }
.pagination { display: flex; gap: 8px; }
.page-btn { border: none; background: var(--panel); border-radius:var(--radius-sm); padding: 6px 13px; cursor: pointer; color: var(--text); font-family:inherit; transition: 0.2s; box-shadow:var(--shadow-sm); }
.page-btn:hover { color:var(--music); }
.page-btn.active { color: var(--music); background: var(--panel); font-weight: bold; box-shadow:var(--shadow-inset-sm); }
.page-btn:disabled { opacity: 0.4; cursor: default; box-shadow:none; }

.bottom-controls { width: 100%; display: flex; justify-content: center; align-items: center; gap:20px; flex-wrap:wrap; box-sizing:border-box; }
.dc-search-box { display: flex; gap: 8px; }
.dc-search-box select, .dc-search-box input { padding: 8px 12px; border: none; background: var(--bg); color: var(--text); border-radius: var(--radius-sm); font-family:inherit; box-shadow:var(--shadow-inset-sm); }
.dc-search-box select:focus, .dc-search-box input:focus { outline:none; }

.btn-dc-search { background: var(--panel); color: var(--text); border: none; padding: 8px 18px; cursor: pointer; font-weight: bold; border-radius: var(--radius-sm); font-family:inherit; transition: 0.2s; box-shadow:var(--shadow-sm); }
.btn-dc-search:hover { color: var(--music); }
.btn-dc-write { background: var(--music); color: #fff; border: none; padding: 8px 18px; cursor: pointer; font-weight: bold; border-radius: var(--radius-sm); font-family:inherit; transition: 0.2s; box-shadow:var(--shadow-sm); }
.btn-dc-write:hover { background: var(--music-hover); }

/* 앨범 그리드 및 뷰 영역 */
#albumGrid { display:none; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:20px; margin-top:20px; width:100%; box-sizing:border-box;}
.album-card { background:var(--panel); border-radius:var(--radius-lg); cursor:pointer; transition:all 0.2s; display:flex; flex-direction:column; box-shadow:var(--shadow-sm);}
.album-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.album-card img { width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
.album-card-info { padding:14px; flex:1; display:flex; flex-direction:column;}
.album-card-title { font-weight:800; font-size:15px; margin-bottom:4px; color:var(--text); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.album-card-artist { font-size:12px; color:var(--muted); margin-bottom:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.album-card-rating { font-size:15px; color:var(--special); font-weight:900; margin-top:auto;}
.album-card-rating span { font-size:11px; color:var(--muted); font-weight:normal; margin-left:4px;}

#albumDetailSection { display: none; background:var(--panel); border-radius:var(--radius-lg); padding:30px; width:100%; box-sizing:border-box; box-shadow:var(--shadow-sm);}
.ad-header { display:flex; gap:24px; margin-bottom:30px; align-items:flex-end;}
.ad-header img { width:160px; height:160px; border-radius:var(--radius); object-fit:cover; box-shadow:var(--shadow-md);}
.ad-info { flex:1; }
.ad-title { font-size:26px; font-weight:900; color:var(--text); margin-bottom:8px; line-height:1.3; word-break:keep-all;}
.ad-artist { font-size:15px; color:var(--muted); margin-bottom:16px;}
.ad-score { font-size:24px; font-weight:bold; color:var(--special); display:flex; align-items:center; gap:8px;}
.ad-score span { font-size:14px; color:var(--muted); font-weight:normal;}

.review-list { display:flex; flex-direction:column; gap:16px; margin-top:20px;}
.review-card { background:var(--panel); padding:20px; border-radius:var(--radius); cursor:pointer; transition:0.2s; box-shadow:var(--shadow-sm);}
.review-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.rc-header { display:flex; justify-content:space-between; margin-bottom:10px; align-items:center;}
.rc-author { font-size:13px; font-weight:bold; color:var(--muted);}
.rc-stars { font-size:14px; font-weight:bold; color:var(--special);}
.rc-title { font-size:16px; font-weight:800; color:var(--text); margin-bottom:8px;}
.rc-content { font-size:14px; color:var(--muted); line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}

#postViewSection { display: none; margin-bottom: 40px; width:100%; box-sizing:border-box; }
.view-box { background:var(--panel); border-radius:var(--radius-lg); width:100%; box-sizing:border-box; box-shadow:var(--shadow-sm);}

.view-header { padding:24px 26px 20px; }
.view-title { font-size:22px; font-weight:700; color:var(--text); margin:0 0 16px 0; line-height:1.4; word-break:break-all;}
.view-meta { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); flex-wrap:wrap; gap:10px;}
.view-meta-left { display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.view-meta-right { display:flex; gap:16px; }
.view-content-area { padding:10px 26px 30px; min-height:300px; font-size:15px; line-height:1.75; color:var(--text); white-space:pre-wrap; word-break:break-word;}
.view-content-area img { max-width:100%; border-radius:var(--radius); margin:12px 0; display:block; }
.view-footer { padding:20px 26px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px;}

.btn-recommend { background:var(--panel); border:none; color:var(--music); padding:11px 26px; border-radius:999px; font-size:14px; font-weight:bold; cursor:pointer; transition:0.2s; font-family:inherit; display:flex; align-items:center; gap:8px; box-shadow:var(--shadow-sm);}
.btn-recommend:hover { transform:translateY(-1px); }
.btn-recommend:active { box-shadow:var(--shadow-inset); transform:none; }

.view-controls { display:flex; gap:10px;}
.btn-list { background:var(--panel); color:var(--text); border:none; padding:9px 20px; border-radius:var(--radius-sm); font-size:13px; cursor:pointer; font-family:inherit; font-weight:600; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-list:hover { color:var(--music); }
.btn-admin-edit { background:var(--music); color:#fff; border:none; padding:9px 20px; border-radius:var(--radius-sm); font-size:13px; cursor:pointer; font-weight:700; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-admin-edit:hover { background:var(--music-hover); }
.btn-admin-delete { background:var(--admin); color:#fff; border:none; padding:9px 20px; border-radius:var(--radius-sm); font-size:13px; cursor:pointer; font-weight:700; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-admin-delete:hover { filter:brightness(1.08); }

/* 글쓰기 및 모달 영역 */
#writeSection { display: none; background:var(--panel); border-radius:var(--radius-lg); padding:0; width:100%; box-sizing:border-box; box-shadow:var(--shadow-sm);}
.write-header { padding:22px 26px 12px; }
.write-header h2 { margin:0; font-size:20px; color:var(--text); font-weight:800;}
.write-body { padding:14px 26px 26px; }
.write-row { display:flex; gap:14px; margin-bottom:14px; flex-wrap:wrap;}
.write-row select, .write-row input { background:var(--bg); border:none; color:var(--text); padding:12px 14px; border-radius:var(--radius-sm); font-size:14px; outline:none; font-family:inherit; box-sizing:border-box; box-shadow:var(--shadow-inset-sm);}
#postTag { width: 150px; }
#postTeam { width: 150px; }
#postAuthor { width: 150px; }
#postGuestPw { width: 150px; }
#postTitle { flex:1; min-width:200px;}

.write-toolbar { background:transparent; padding:10px 4px; display:flex; gap:12px; align-items:center; flex-wrap:wrap;}
.btn-toolbar { background:var(--panel); border:none; color:var(--text); cursor:pointer; font-size:13px; font-weight:bold; padding:8px 14px; border-radius:var(--radius-sm); display:flex; align-items:center; gap:6px; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-toolbar:hover { color:var(--music); }

#postContent { width:100%; height:380px; background:var(--bg); border:none; color:var(--text); padding:18px; font-family:inherit; font-size:15px; resize:vertical; outline:none; border-radius:var(--radius); line-height:1.6; box-sizing:border-box; box-shadow:var(--shadow-inset);}

.write-footer { padding:16px 26px 26px; display:flex; justify-content:flex-end; gap:12px;}
.btn-cancel-write { background:var(--panel); color:var(--text); border:none; padding:11px 26px; border-radius:var(--radius-sm); font-size:14px; cursor:pointer; font-weight:bold; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-submit-write { background:var(--music); color:#fff; border:none; padding:11px 34px; border-radius:var(--radius-sm); font-size:14px; cursor:pointer; font-weight:bold; transition:0.2s; box-shadow:var(--shadow-sm);}
.btn-submit-write:hover { background:var(--music-hover); }

#albumSearchWrap { background:transparent; padding:4px; margin-bottom:16px; display:none; box-sizing:border-box;}
.search-result-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 20px; margin: 15px -20px 0; max-height: 380px; overflow-y: auto; padding: 20px; }
.search-item { background: var(--panel); border: none; border-radius: var(--radius); padding: 10px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; box-shadow:var(--shadow-sm); }
.search-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.search-item img { width:100%; aspect-ratio:1/1; border-radius:var(--radius-sm); object-fit:cover; margin-bottom:8px;}
.search-item .s-title { font-size:13px; font-weight:bold; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.search-item .s-artist { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

#starInputWrapper { align-items:center; gap:8px; margin-top:16px; padding-top:16px; display:none; flex-wrap:wrap;}
#starsContainer { display:flex; gap:4px; font-size:32px; cursor:pointer; }
#starsContainer .star { color:var(--special); transition:0.1s; user-select:none;}

.yt-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 20px 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.yt-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.site-footer { padding:30px 20px; text-align:center; color:var(--muted); font-size:12px; line-height:1.6; margin-top:auto; background:var(--bg);}
.footer-inner { max-width:1180px; margin:0 auto; }
.footer-inner a { color:var(--muted); text-decoration:underline; cursor:pointer;}
.footer-inner a:hover { color:var(--text); }

/* 모바일 반응형 완벽 수정 */
@media (max-width: 840px) {
  body { overflow-x: hidden; width: 100%; }
  .shell { grid-template-columns: 1fr; padding: 0; gap: 0; width: 100%; max-width: 100%; box-sizing: border-box; margin-top: 20px; }
  .shell > * { min-width: 0; }
  main { max-width: 100%; overflow-x: hidden; }

  .header-inner { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 8px; padding: 14px; width: 100%; box-sizing: border-box; }
  .brand { text-align: left; font-size: 15px; gap: 8px; flex: none; }
  .logo-badge { width: 28px; height: 28px; }
  .bw-slot { width: 19px; }
  .user-actions { gap: 8px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; width: auto; box-sizing: border-box; }
  .write-btn { padding: 6px 12px; font-size: 12px; }
  .auth-btn { font-size: 12px; }

  #userStatus { max-width: 70px; text-align: right; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; margin-bottom: 0; }

  .search { max-width: 100%; order: 3; display: none; }

  /* 게시판목록: 카테고리 구분과 상관없이 하나의 격자(grid)로 합쳐서, 각 줄이 동일한 칸 수로 꽉 채워지는 형태 */
  .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
    overflow-x: visible;
    background: var(--panel);
    box-shadow:none;
    padding: 10px 12px;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
  }
  /* cat-group과 board-list(ul) 자체를 렌더링에서 지우고, 그 안의 li들만 sidebar의 직계 grid 아이템으로 끌어올림 */
  .cat-group { display: contents; }
  .cat-head { display: none; }
  .board-list {
    display: contents;
    padding: 0;
    margin: 0;
  }
  .board-list li { list-style: none; }
  .board-list li a {
    margin:0;
    padding: 8px 6px;
    font-size: 13px;
    background: var(--bg);
    border-radius: 20px;
    display: block;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: var(--shadow-sm);
  }
  .board-list li a.active {
    background: var(--music);
    color: #fff;
    font-weight: bold;
    box-shadow: var(--shadow-inset-sm);
  }

  .board-title-row { padding: 12px; margin: 0; width: 100%; box-sizing: border-box; }

  /* 핫게시판목록: 가로 스크롤 캐러셀 대신 폭에 맞춰 자동으로 줄바꿈되는 적응형 그리드 */
  .widget-container {
    margin: 0 0 10px;
    padding: 6px 12px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .widget-card {
    min-width: 0;
    max-width: 100%;
    flex: none;
    scroll-snap-align: none;
    box-sizing: border-box;
    padding: 14px;
  }
  .widget-title { font-size: 13.5px; -webkit-line-clamp: 2; }
  .widget-stats { font-size: 11px; gap: 6px; }

  #baseballTeamTabs { gap: 8px; margin-bottom: 14px; }
  .team-tab-btn { padding: 7px 14px; font-size: 12px; }
  .team-badge { font-size: 10px; padding: 1px 6px; margin-left: 4px; }

  .post-table-wrap { margin: 0 20px; border-radius:0; box-shadow:none; width: auto; box-sizing: border-box; }
  .view-box, #writeSection, #albumDetailSection { margin: 0 20px; width: auto; }
  .table-scroll { overflow-x: visible; overflow-y: visible; border-radius: 0; }
  .dc-table { display: block; min-width: 0; border: none; width: 100%; box-sizing: border-box; }
  .dc-table thead { display: none; }
  .dc-table tbody { display: block; width: 100%; box-sizing: border-box; }

  .dc-table td { width: auto !important; padding: 0; border: none; text-align: left; line-height: 1.2; }

  /* 1줄짜리 flex 행: 제목이 남는 공간을 채우고, 나머지 메타 정보는 자연스럽게 오른쪽 끝에 정렬됨 */
  .dc-table tr {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px;
      background: var(--panel);
      border-radius: var(--radius-sm);
      margin: 0 0 8px;
      width: 100%;
      box-sizing: border-box;
      box-shadow: var(--shadow-sm);
  }
  .dc-table tr:hover { background: var(--panel); }

  .col-id { display: none; }
  .col-author { display: none; } /* 한 줄로 압축하기 위해 모바일에서는 작성자 숨김 */

  .col-category { flex: 0 0 auto; }
  .col-title { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 0 !important; }

  .col-date, .col-views, .col-likes { flex: 0 0 auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
  .col-date::before { content: ''; }
  .col-views::before { content: '· 조회 '; color: var(--muted-2); }
  .col-likes::before { content: '· 추천 '; color: var(--muted-2); }
  .col-likes { color: var(--admin); font-weight: bold; }

  .board-footer { padding: 16px 12px; margin-top: 0; width: 100%; box-sizing: border-box; }

  .bottom-controls { flex-direction: column; gap: 12px; width: 100%; box-sizing: border-box; }
  .dc-search-box { width: 100%; display: flex; gap: 8px; box-sizing: border-box; }
  .dc-search-box select { width: 30%; }
  .dc-search-box input { flex: 1; min-width: 0; box-sizing: border-box; }
  .btn-dc-write { width: 100%; padding: 14px; border-radius: var(--radius-sm); font-size: 15px; box-sizing: border-box; display: block; }

  #albumGrid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; padding: 20px; width: 100%; box-sizing: border-box;}
  .ad-header { flex-direction: column; align-items: center; text-align: center; gap: 16px; width: 100%; box-sizing: border-box;}
  .view-header, .view-content-area, .view-footer, .write-header, .write-body, .write-footer { padding: 16px; width: 100%; box-sizing: border-box; }
  .modal-content { width: 90%; padding: 20px; box-sizing: border-box; }
}

/* 아주 좁은 화면(작은 폰)에서 한층 더 촘촘하게 */
@media (max-width: 380px) {
  .widget-container { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
  .sidebar { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
  .board-list li a { padding: 6px 4px; font-size: 12px; }
}

.modal{ display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); justify-content:center; align-items:center; z-index:100; backdrop-filter:blur(4px);}
.modal-content{ background:var(--panel); width:90%; padding:28px; border-radius:var(--radius-lg); box-shadow:var(--shadow-md); box-sizing:border-box;}
.modal-content.small { max-width:350px; }
.modal-content h2{ margin-top:0; font-size:18px; color:var(--text); margin-bottom:18px;}
.modal-content input[type="email"], .modal-content input[type="password"], .modal-content input[type="text"] { width:100%; background:var(--bg); border:none; color:var(--text); padding:12px 14px; margin-bottom:14px; font-family:inherit; border-radius:var(--radius-sm); font-size:14px; outline:none; box-sizing:border-box; box-shadow:var(--shadow-inset-sm);}
.modal-btns{ display:flex; justify-content:flex-end; gap:10px; margin-top:16px;}
.modal-btns button{ border:none; padding:10px 20px; cursor:pointer; font-weight:700; font-family:inherit; border-radius:var(--radius-sm); font-size:13px; transition:0.2s; box-shadow:var(--shadow-sm);}

/* 댓글 및 대댓글 디자인 */
.comment-section { background: var(--bg); width:100%; box-sizing:border-box; padding-top:4px; }
.comment-count { font-size: 14px; font-weight: bold; padding: 15px 26px; color: var(--text); }
.comment-list { list-style: none; margin: 0; padding: 0 26px; width:100%; box-sizing:border-box; display:flex; flex-direction:column; gap:10px; }
.comment-item { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-sizing:border-box; background:var(--panel); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.comment-item.reply { margin-left: 30px; box-shadow:var(--shadow-inset-sm); }
.ci-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap:wrap; }
.ci-author { font-weight: bold; color: var(--text); }
.ci-date { color: var(--muted); font-size: 12px; }
.ci-content { font-size: 14px; color: var(--text); line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.ci-actions button { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; margin-right: 12px; font-family: inherit; font-weight: bold; transition:color 0.15s; }
.ci-actions button:hover { color: var(--music); text-decoration: underline; }

.comment-write { padding: 20px 26px 26px; box-sizing:border-box; width:100%; }
.cw-author { margin-bottom: 10px; display:flex; gap:8px; flex-wrap:wrap; }
.cw-author input { background: var(--bg); border: none; color: var(--text); padding: 9px 12px; border-radius: var(--radius-sm); outline: none; font-size: 13px; width: 120px; font-family: inherit; box-shadow:var(--shadow-inset-sm);}
.cw-input { display: flex; gap: 10px; box-sizing:border-box; width:100%; }
.cw-input textarea { flex: 1; background: var(--bg); border: none; color: var(--text); padding: 12px 14px; border-radius: var(--radius-sm); outline: none; font-size: 13px; resize: none; height: 70px; font-family: inherit; box-sizing:border-box; min-width:0; box-shadow:var(--shadow-inset-sm);}
.cw-input button { background: var(--music); color: #fff; border: none; font-weight: bold; padding: 0 24px; border-radius: var(--radius-sm); cursor: pointer; transition: 0.2s; font-family: inherit; white-space:nowrap; box-shadow:var(--shadow-sm); }
.cw-input button:hover { background: var(--music-hover); }

.reply-write-form { margin-top: 12px; padding: 15px; background: var(--bg); border-radius: var(--radius-sm); display: none; box-sizing:border-box; width:100%; box-shadow:var(--shadow-inset-sm); }
