/* =========================================================
   WAFLASH Bright — 게임 아카이브 티스토리 스킨 (사이드바 없음)
   ========================================================= */

:root {
  --bg: #fff6fa;
  --surface: #ffffff;
  --border: #fbdce9;
  --text: #2a1a24;
  --text-muted: #7a6270;
  --text-faint: #b0929f;
  --primary: #e63f8a;
  --primary-dark: #c92a74;
  --primary-light: #fff0f6;
  --accent: #ff7eb3;
  --accent-2: #ffb86b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --glow: 230, 63, 138;
  --hero-1: #ffe3ef;
  --hero-2: #fff1e0;
  --header-bg: rgba(255, 255, 255, 0.96);
  --shadow-sm: 0 1px 3px rgba(var(--glow), 0.08);
  --shadow-md: 0 8px 24px rgba(var(--glow), 0.14);
  --shadow-lg: 0 16px 40px rgba(120, 30, 70, 0.16);
  --header-h: 60px;
  --content-max: 1280px;
  --grid-gap: 16px;
}

[data-theme="dark"],
[data-theme="black"] {
  --bg: #17121a;
  --surface: #221a26;
  --border: #3a2a42;
  --text: #f3e9ef;
  --text-muted: #b9a3b1;
  --text-faint: #7d6677;
  --primary: #ff7eb3;
  --primary-dark: #ff9cc5;
  --primary-light: #35202d;
  --hero-1: #3a2030;
  --hero-2: #3a2d22;
  --header-bg: rgba(34, 26, 38, 0.92);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}



body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

#wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 헤더 ---------- */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  position: relative;
}

.logo a {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.15s;
  flex: none;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }

#mobileMenuBtn {
  display: none;
  flex-direction: column;
  gap: 4px;
}
#mobileMenuBtn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
#mobileMenuBtn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#mobileMenuBtn.active span:nth-child(2) { opacity: 0; }
#mobileMenuBtn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* GNB */
#gnb { flex: 1; }
.gnb-list { display: flex; align-items: center; gap: 2px; }
.gnb-list > li { position: relative; }
.gnb-list > li > a {
  display: block;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.gnb-list > li > a:hover,
.gnb-list > li.open > a { background: var(--primary-light); color: var(--primary); }

.sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.has-sub:hover > .sub-menu,
.has-sub.open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu li a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.sub-menu li a:hover { background: var(--bg); color: var(--primary); }

.gnb-back { display: none; }

.header-actions { display: flex; align-items: center; gap: 2px; }

.search-box {
  position: absolute;
  top: 100%;
  right: 20px;
  margin-top: 10px;
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.18s;
}
.search-box.open { opacity: 1; visibility: visible; transform: translateY(0); }
.search-box input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 200px;
  background: transparent;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-faint); }
.search-box button {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 레이아웃 (사이드바 없음, 단일 컬럼) ---------- */
.layout {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  padding: 28px 20px 60px;
  flex: 1;
}

/* ---------- 히어로 ---------- */
.hero {
  text-align: center;
  padding: 20px 10px 34px;
}
.hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.01em; }
.hero p { font-size: 14px; color: var(--text-muted); }

/* ---------- 섹션 헤더 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text);
}
.section-head h1,
.section-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-head .count { font-size: 13px; font-weight: 500; color: var(--text-faint); margin-left: 6px; }
.more-link { font-size: 13px; font-weight: 600; color: var(--primary); }

.list-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.list-more-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.list-more-btn .plus { font-size: 16px; font-weight: 800; line-height: 1; }

/* ---------- 게임 카드 그리드: 데스크탑 6 / 태블릿 3 / 모바일 2 ---------- */
.list-section { margin-bottom: 36px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
  gap: var(--grid-gap);
}

.empty { padding: 40px 0; text-align: center; color: var(--text-faint); grid-column: 1 / -1; }

/* ---------- 게임 카드 ---------- */
.game-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s, box-shadow 0.16s;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.game-card .thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg);
  overflow: hidden;
}
/* 대표이미지가 없거나 썸네일 로딩에 실패한 경우 보여줄 기본 placeholder */
.game-card .thumb::before {
  content: '🎮';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-faint);
}
.game-card .thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card .title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 10px 9px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* ---------- 게시글 상세 ---------- */
.post-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 30px 26px;
  margin-bottom: 22px;
}
.post-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
#content-container { margin-bottom: 14px; }
#article-title { color: var(--text); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; margin: 4px 0 8px; }
.post-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-faint); margin-bottom: 6px; }
.post-body { font-size: var(--post-font, 15.5px); line-height: 1.85; word-break: break-word; }
.post-body img { border-radius: var(--radius-sm); margin: 10px auto; }
.post-body iframe, .post-body embed, .post-body object { max-width: 100%; }

.post-tags { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: 13px; }
.post-tags .label { font-weight: 700; color: var(--text-faint); margin-right: 8px; }
.post-tags a { color: var(--primary); margin-right: 6px; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}
.post-nav-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color 0.15s;
}
.post-nav-item:hover { border-color: var(--primary); }
.post-nav-item .dir { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.post-nav-item .ttl { display: block; font-size: 13.5px; font-weight: 700; }
.post-nav-item.next { text-align: right; }

.related-section { margin-top: 4px; }

#comment-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 10px;
}

/* ---------- 방명록 상단 "방명록N" 카운터 → 안내 문구로 교체 ----------
   [data-tistory-react-app="Comment"] 안의 .tt-box-total(방명록 글자 +
   전체 개수 숫자)은 티스토리 리액트 컴포넌트가 그리는 요소라 스킨
   HTML에서 직접 텍스트를 바꿀 수 없다. 그래서 해당 요소를 숨기고
   같은 자리에 ::before로 원하는 안내 문구를 대신 넣는다. */
.guestbook-section .tt-box-total {
  display: none;
}
.guestbook-section .tt-comment-cont::before {
  content: "원하는 게임이 있으시면 글을 남겨주세요.";
  display: block;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--primary-light);
  color: var(--text) !important;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 방명록 / 댓글 작성 폼 (티스토리 기본 마크업 대응) ----------
   방명록·댓글 폼은 티스토리가 자체적으로 [##_guestbook_group_##],
   [##_comment_group_##] 위치에 마크업을 삽입하므로 스킨에서 클래스명을
   지정할 수 없다. 따라서 폼 요소 전반에 넓게 색상을 지정해 다크/화이트
   모드 모두에서 글자가 보이도록 강제한다. */
.guestbook-section,
.guestbook-section *,
#comment-area,
#comment-area * {
  color: var(--text) !important;
}
.guestbook-section a,
#comment-area a {
  color: var(--primary);
}
.guestbook-section input,
.guestbook-section textarea,
.guestbook-section select,
#comment-area input,
#comment-area textarea,
#comment-area select {
  color: var(--text) !important;
  background-color: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13.5px;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
}
.guestbook-section [contenteditable="true"],
.guestbook-section [contenteditable="true"] *,
#comment-area [contenteditable="true"],
#comment-area [contenteditable="true"] * {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  background-color: var(--surface) !important;
}
.guestbook-section input::placeholder,
.guestbook-section textarea::placeholder,
#comment-area input::placeholder,
#comment-area textarea::placeholder {
  color: var(--text-faint) !important;
  opacity: 1;
}
.guestbook-section button,
.guestbook-section input[type="submit"],
.guestbook-section input[type="button"],
#comment-area button,
#comment-area input[type="submit"],
#comment-area input[type="button"] {
  color: #fff !important;
  background: var(--primary) !important;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
}
.guestbook-section button:hover,
.guestbook-section input[type="submit"]:hover,
#comment-area button:hover,
#comment-area input[type="submit"]:hover {
  background: var(--primary-dark) !important;
}

/* ---------- 페이징 ---------- */
.paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 20px 0 10px;
}
.page-nav, .page-num {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
}
.page-num:hover, .page-nav:hover { border-color: var(--primary); color: var(--primary); }
.page-nums { display: flex; gap: 4px; }

/* ---------- 푸터 ---------- */
#footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 20px;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--primary); }

/* ---------- 반응형 ---------- */

/* 태블릿: 3열 */
@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 900px 이하: 모바일 메뉴로 전환 */
@media (max-width: 900px) {
  #mobileMenuBtn { display: inline-flex; }
  #gnb {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.2s;
    overflow: visible;
    max-height: none;
    height: auto;
    padding: 10px 14px 40px;
    z-index: 99;
  }
  #gnb.open { transform: translateX(0); }
  .gnb-list { flex-direction: column; align-items: stretch; gap: 0; }
  .gnb-list > li > a { padding: 13px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    background: var(--bg);
    flex-direction: column;
    min-width: 0;
    max-height: none;
    margin: 0 0 4px;
  }
  .has-sub.open > .sub-menu { display: flex; }

  /* 1단계: 상위 메뉴만 표시 (기본 상태) */
  .gnb-back { display: none; }

  /* 2단계: 상위 메뉴를 탭하면 해당 하위 메뉴 전체 목록만 전체 화면으로 표시 */
  #gnb.drilled .gnb-back {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 13px 8px;
    margin-bottom: 4px;
    border: none;
    background: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
  }
  #gnb.drilled .gnb-list > li { display: none; }
  #gnb.drilled .gnb-list > li.open { display: block; }
  #gnb.drilled .gnb-list > li.open > a { display: none; }
  #gnb.drilled .has-sub.open > .sub-menu {
    display: flex;
    margin: 0;
    background: transparent;
  }
  #gnb.drilled .sub-menu li a {
    padding: 13px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14.5px;
    color: var(--text);
    border-radius: 0;
  }

  .search-box { right: 10px; left: 10px; }
  .search-box input { width: auto; flex: 1; }
}

/* 모바일: 2열 */
@media (max-width: 640px) {
  .header-inner { gap: 10px; padding: 0 14px; }
  .logo a { font-size: 17px; }
  .hero { padding: 14px 4px 26px; }
  .hero h2 { font-size: 17px; }
  .hero p { font-size: 12.5px; }
  .post-detail { padding: 20px 18px; }
  #article-title { font-size: 21px; }
  .post-nav { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card .title { font-size: 12px; padding: 7px 8px 8px; }
}




/* =========================================================
   키즈짱 스타일 리디자인 (분홍 · 둥근 카드 · 게임 액션바)
   ========================================================= */
body { background: var(--bg); }

/* ---------- 상단 유틸바 ---------- */
#utilbar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; font-size: 13px; }
[data-theme="dark"] #utilbar,
[data-theme="black"] #utilbar { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 42%, #000), color-mix(in srgb, var(--accent-2) 42%, #000)); }
.utilbar-inner { max-width: var(--content-max); margin: 0 auto; padding: 0 20px; min-height: 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.util-note { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.util-links { display: flex; align-items: center; gap: 4px; flex: none; }
.util-links a, .util-links button { color: #fff; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; transition: background .15s; }
.util-links a:hover, .util-links button:hover { background: rgba(255,255,255,.25); }
.util-links em { font-style: normal; background: rgba(255,255,255,.3); border-radius: 999px; padding: 0 7px; margin-left: 2px; font-size: 12px; }
.util-sep { width: 1px; height: 14px; background: rgba(255,255,255,.5); margin: 0 4px; }

/* ---------- 헤더 ---------- */
#header { border-bottom: 2px solid var(--border); }
.logo a { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); }
.logo-ico { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 20px; }
.gnb-list > li > a { font-weight: 700; }

/* ---------- 히어로 ---------- */
.hero { margin-bottom: 26px; padding: 30px 16px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 100%); border: 2px solid var(--border); }
.hero h2 { color: var(--primary); }

/* ---------- 섹션 헤더 · 카드 ---------- */
.section-head { border-bottom: 3px solid var(--accent); }
.section-head h1::before,
.section-head h2::before { content: ''; display: inline-block; width: 8px; height: 18px; border-radius: 4px;
  background: linear-gradient(var(--accent), var(--accent-2)); margin-right: 8px; vertical-align: -2px; }
.game-card { border: 2px solid var(--border); border-radius: 16px; }
.game-card:hover { border-color: var(--accent); transform: translateY(-5px) rotate(-.4deg); }
.game-card .title { font-weight: 800; }
.list-more-btn { border: 2px solid var(--border); border-radius: 999px; }

/* ---------- 게임 상세 ---------- */
.post-detail { border: 2px solid var(--border); box-shadow: var(--shadow-sm); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb b { color: var(--text-muted); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head { margin-bottom: 4px; }
.post-cat { background: var(--primary-light); border: 1px solid var(--border); }

/* 게임 영역(ruffle-container) 바로 아래에 붙는 액션 바 */
.game-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 12px; margin-bottom: 4px;
  background: var(--primary-light); border: 2px solid var(--border); border-top: 0; border-radius: 0 0 14px 14px; }
.ga-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 700;
  transition: transform .12s, border-color .15s, background .15s, color .15s; }
.ga-btn:hover { border-color: var(--accent); color: var(--primary); transform: translateY(-1px); }
.ga-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ga-ico { font-size: 15px; line-height: 1; }
[data-theme="dark"] .ga-btn.on,
[data-theme="black"] .ga-btn.on { color: #2a1a24; }

/* iPhone 등 전체화면 API가 없는 브라우저용 대체 전체화면 */
.ruffle-container.pseudo-full { position: fixed !important; inset: 0; z-index: 9999; width: 100vw !important; height: 100% !important; margin: 0; border-radius: 0; }
body.no-scroll { overflow: hidden; }

/* ---------- 반응 버튼 ---------- */
.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; padding: 14px 16px;
  background: var(--primary-light); border-radius: var(--radius-md); }
.reactions-label { font-size: 13px; font-weight: 800; color: var(--text-muted); margin-right: 4px; }
.reactions button { padding: 7px 13px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--text); }
.reactions button:hover { border-color: var(--accent); }
.reactions button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 글 본문 안 표/제목 (게임 정보 표 등) ---------- */
.post-body h2, .post-overview-h2 { font-size: 20px; font-weight: 800; margin: 30px 0 12px; padding: 10px 14px; border-left: 6px solid var(--accent);
  background: var(--primary-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; line-height: 1.4; }
.post-body h3 { font-size: 17px; font-weight: 800; margin: 22px 0 10px; color: var(--primary); }
.post-body table { width: 100%; border-collapse: separate !important; border-spacing: 0; border: 2px solid var(--border) !important;
  border-radius: var(--radius-md); overflow: hidden; margin: 12px 0; font-size: 14px; }
.post-body table td, .post-body table th { border: 0 !important; border-bottom: 1px solid var(--border) !important; padding: 10px 12px; }
.post-body table tr:last-child td { border-bottom: 0 !important; }
.post-body table tr:first-child td { background: var(--primary-light); font-weight: 800; color: var(--primary); }
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote { border-left: 4px solid var(--accent); background: var(--primary-light); padding: 10px 14px; margin: 14px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.post-tags a { background: var(--primary-light); padding: 3px 9px; border-radius: 999px; display: inline-block; margin-bottom: 4px; }
.post-nav-item, #comment-area { border-width: 2px; }
.related-section .section-head .count { font-weight: 600; }

/* ---------- 내 게임함 모달 · 토스트 ---------- */
.fav-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(30, 10, 22, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fav-modal[hidden] { display: none; }
.fav-box { width: min(560px, 100%); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.fav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 2px solid var(--border); font-size: 16px; }
.fav-head button { font-size: 16px; color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%; }
.fav-head button:hover { background: var(--primary-light); }
.fav-list { overflow-y: auto; padding: 10px; display: grid; gap: 8px; }
.fav-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-md); border: 2px solid var(--border); }
.fav-item:hover { border-color: var(--accent); background: var(--primary-light); }
.fav-th { flex: none; width: 72px; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.fav-th img { width: 100%; height: 100%; object-fit: cover; }
.fav-tt { font-size: 14px; font-weight: 700; line-height: 1.35; }
.fav-empty { text-align: center; padding: 30px 10px; color: var(--text-muted); font-size: 14px; line-height: 1.7; grid-column: 1 / -1; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 10001; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #2a1a24; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700; transition: all .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .util-note { display: none; }
  .util-links { width: 100%; justify-content: space-between; }
  .utilbar-inner { padding: 0 8px; }
  .game-actions { gap: 6px; padding: 8px; }
  .ga-btn { padding: 9px 11px; font-size: 13px; flex: 0 1 auto; justify-content: center; white-space: nowrap; }
  .post-body h2, .post-overview-h2 { font-size: 18px; }
}


/* =========================================================
   색상 테마 (스킨 옵션 > 디자인 > 색상 테마) — 기본은 위쪽의 핑크
   ========================================================= */
:root[data-palette="blue"] {
  --bg: #f3f8ff; --border: #d6e6fb; --primary: #2f6df0; --primary-dark: #1f55c8; --primary-light: #eaf2ff;
  --accent: #5aa2ff; --accent-2: #7fd6ff; --glow: 47, 109, 240; --hero-1: #dcebff; --hero-2: #e6f7ff;
}
:root[data-theme="dark"][data-palette="blue"],
:root[data-theme="black"][data-palette="blue"] {
  --bg: #111722; --surface: #1a2230; --border: #2a3750; --primary: #6ea8ff; --primary-dark: #9cc2ff; --primary-light: #1e2c44;
  --hero-1: #1d2c45; --hero-2: #1d3a44; --header-bg: rgba(26, 34, 48, 0.92);
}
:root[data-palette="purple"] {
  --bg: #f8f5ff; --border: #e4daf9; --primary: #7c4dde; --primary-dark: #6335c0; --primary-light: #f1ebff;
  --accent: #a47bff; --accent-2: #ff9de0; --glow: 124, 77, 222; --hero-1: #eadfff; --hero-2: #ffe6f6;
}
:root[data-theme="dark"][data-palette="purple"],
:root[data-theme="black"][data-palette="purple"] {
  --bg: #17131f; --surface: #211b2e; --border: #382d52; --primary: #b394ff; --primary-dark: #cbb6ff; --primary-light: #2c2442;
  --hero-1: #2b2342; --hero-2: #3a2440; --header-bg: rgba(33, 27, 46, 0.92);
}
:root[data-palette="green"] {
  --bg: #f1fbf6; --border: #cfeedd; --primary: #0f9d65; --primary-dark: #0b8453; --primary-light: #e6f8ef;
  --accent: #3cd08f; --accent-2: #b6e35a; --glow: 15, 157, 101; --hero-1: #d9f6e7; --hero-2: #f2fbd8;
}
:root[data-theme="dark"][data-palette="green"],
:root[data-theme="black"][data-palette="green"] {
  --bg: #101a16; --surface: #18241f; --border: #263d33; --primary: #4fdc9c; --primary-dark: #7ae8b5; --primary-light: #1d3329;
  --hero-1: #1d3329; --hero-2: #2c3320; --header-bg: rgba(24, 36, 31, 0.92);
}
:root[data-palette="orange"] {
  --bg: #fff8f0; --border: #fbe0c4; --primary: #e0600c; --primary-dark: #bd4c05; --primary-light: #fff1e3;
  --accent: #ff9a3c; --accent-2: #ffd25a; --glow: 224, 96, 12; --hero-1: #ffe6cc; --hero-2: #fff3c8;
}
:root[data-theme="dark"][data-palette="orange"],
:root[data-theme="black"][data-palette="orange"] {
  --bg: #1b1510; --surface: #261d15; --border: #46341f; --primary: #ffae5c; --primary-dark: #ffc58a; --primary-light: #35271a;
  --hero-1: #3b2a18; --hero-2: #3a3318; --header-bg: rgba(38, 29, 21, 0.92);
}

/* 가로 개수 옵션: 4~5개일 땐 제목 글자도 조금 키움 (PC 전용, 태블릿·모바일은 3/2열 고정) */
@media (min-width: 1025px) {
  .game-card .title { font-size: clamp(12px, calc(0.9vw + 2px), 16px); }
}

/* =========================================================
   화이트 / 블랙 모드
   - 배경·표면·글자색만 무채색으로 바꾸고, 포인트 색(--primary 등)은 선택한 팔레트를 그대로 사용
   - 팔레트 규칙보다 우선하도록 [data-palette]를 함께 지정
   ========================================================= */
:root[data-theme="white"],
:root[data-theme="white"][data-palette] {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e4e4e7;
  --text: #111111;
  --text-muted: #5f5f68;
  --text-faint: #9a9aa3;
  --primary-light: #f4f4f5;
  --hero-1: #f4f4f5;
  --hero-2: #fafafa;
  --header-bg: rgba(255, 255, 255, 0.96);
  --glow: 0, 0, 0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.14);
}
:root[data-theme="black"],
:root[data-theme="black"][data-palette] {
  --bg: #000000;
  --surface: #0b0b0d;
  --border: #26262b;
  --text: #f5f5f5;
  --text-muted: #a6a6ad;
  --text-faint: #6c6c74;
  --primary-light: #141418;
  --hero-1: #111114;
  --hero-2: #0b0b0d;
  --header-bg: rgba(0, 0, 0, 0.92);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8);
}
:root[data-theme="white"] #utilbar { background: #111111; }
:root[data-theme="black"] #utilbar { background: #0b0b0d; border-bottom: 1px solid #26262b; }
