:root {
  color-scheme: light dark;
  --bg: #F0F2F7;
  --bg-grad-a: #EAF0FF;
  --bg-grad-b: #F5EEFF;
  --card: #FFFFFF;
  --text: #14161A;
  --muted: #6b6b72;
  --accent: #5B8DEF;
  --accent-dark: #3D6BD0;
  --accent2: #A366F0;
  --accent3: #F0A64D;
  --border: rgba(0,0,0,0.08);
  --danger: #E5484D;
  --nav-grad-a: #E4EBFF;
  --nav-grad-b: #F1E8FF;
  --nav-text: #3D4160;
  --nav-border: rgba(60,60,120,0.1);
  --nav-hover: rgba(255,255,255,0.55);
  --nav-active: rgba(255,255,255,0.7);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F12;
    --bg-grad-a: #171425;
    --bg-grad-b: #10151f;
    --card: #17181C;
    --text: #F2F2F3;
    --muted: #9a9aa2;
    --accent: #6C9BFF;
    --accent-dark: #86AEFF;
    --accent2: #B98CF5;
    --accent3: #F0B96B;
    --border: rgba(255,255,255,0.1);
    --nav-grad-a: #211d30;
    --nav-grad-b: #1a2233;
    --nav-text: #E8E8F5;
    --nav-border: rgba(255,255,255,0.08);
    --nav-hover: rgba(255,255,255,0.1);
    --nav-active: rgba(255,255,255,0.16);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg) linear-gradient(160deg, var(--bg-grad-a) 0%, var(--bg) 32%, var(--bg-grad-b) 100%) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

nav.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(100deg, var(--nav-grad-a) 0%, var(--nav-grad-b) 100%);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 2px 10px rgba(60,50,150,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
  gap: 10px;
}
nav.topbar .brand { font-weight: 800; font-size: 18px; color: var(--nav-text); }
nav.topbar .links { display: flex; gap: 6px; flex-wrap: wrap; }
nav.topbar .links a {
  color: var(--nav-text);
  opacity: 0.75;
  font-weight: 600;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
nav.topbar .links a:hover { background: var(--nav-hover); opacity: 1; }
nav.topbar .links a.active { background: var(--nav-active); opacity: 1; }
nav.topbar .right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
nav.topbar .nav-nickname { color: var(--nav-text); font-weight: 600; }
nav.topbar .nav-logout {
  background: var(--nav-hover);
  color: var(--nav-text);
  border: 1px solid var(--nav-border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
nav.topbar .nav-logout:hover { background: var(--nav-active); }
nav.topbar .nav-toggle {
  display: none;
  background: var(--nav-hover);
  color: var(--nav-text);
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
}

/* 모바일: 상단 메뉴를 3선(햄버거) 토글로 접는다 */
@media (max-width: 720px) {
  nav.topbar { padding: 12px 16px; }
  nav.topbar .brand { order: 1; }
  nav.topbar .nav-toggle { order: 2; display: inline-flex; }
  nav.topbar .right { order: 3; margin-left: auto; }
  nav.topbar .links {
    order: 4;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
  }
  nav.topbar .links.open { display: flex; }
  nav.topbar .links a { padding: 11px 12px; font-size: 15px; opacity: 0.9; }
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(20,30,60,0.06);
}

.container-wide { max-width: 1080px; }

h1 { font-size: 22px; margin: 0 0 20px; }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-brand-logo { font-size: 40px; line-height: 1; }
.auth-brand-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.form-row textarea { min-height: 160px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-hint.ok { color: #2FAE5B; }
.form-hint.bad { color: var(--danger); }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--accent-dark); }
button.secondary, .btn.secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.error-box {
  background: rgba(229,72,77,0.1);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.message-box {
  background: rgba(91,141,239,0.12);
  color: var(--accent-dark);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.post-row .title { font-weight: 600; }
.post-row .meta { font-size: 12px; color: var(--muted); }

.post-header { border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.post-header .meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.post-content { white-space: pre-wrap; margin-bottom: 24px; }

.comment { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.points-badge {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
a.points-badge { cursor: pointer; transition: transform 0.12s ease; }
a.points-badge:hover { transform: translateY(-1px); background: var(--accent-dark); }

.point-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.point-row:last-child { border-bottom: none; }
.point-label { font-weight: 600; font-size: 14px; }
.point-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.point-delta { font-weight: 800; font-size: 15px; }
.point-delta.plus { color: #2FAE5B; }
.point-delta.minus { color: var(--danger); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.shop-item { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); }
.shop-item .price { color: var(--accent-dark); font-weight: 700; margin: 8px 0; }
.shop-item-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 6px;
  background: var(--nav-hover);
  border-radius: 8px;
}
.badge-equipped {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(91,141,239,0.12);
  border-radius: 8px;
}

/* --- 전화번호 인증 --- */
.phone-verify-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--nav-hover);
}
.phone-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  margin-bottom: 8px;
  user-select: all;
}

/* --- 그림게시판 --- */
.draw-prompt {
  background: var(--nav-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
}
.draw-prompt-label { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.05em; }
.draw-prompt-text { font-size: 17px; font-weight: 700; margin-top: 4px; white-space: pre-wrap; }
.draw-participate { margin-top: 4px; }
.draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}
.draw-toolbar button {
  padding: 5px 12px;
  font-size: 12px;
}
.draw-toolbar button.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.draw-toolbar input[type="color"] { width: 34px; height: 26px; padding: 0; border: none; background: none; vertical-align: middle; }
.draw-toolbar input[type="range"] { vertical-align: middle; }
.draw-canvas {
  width: 100%;
  max-width: 800px;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
  display: block;
}
.draw-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.draw-gallery-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}
.draw-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  display: block;
}
.draw-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}

.chat-window {
  height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg { font-size: 14px; }
.chat-msg .nick { font-weight: 700; color: var(--accent-dark); margin-right: 6px; }
.chat-msg .time { font-size: 11px; color: var(--muted); margin-left: 6px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row input { flex: 1; }

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* --- 메인화면: 대문 슬라이더 + 공지 박스 --- */
.hero-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.slider {
  position: relative;
  flex: 1 1 62%;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(20,30,60,0.12);
}
.slider-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 260px;
}
.slide {
  flex: 0 0 100%;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  color: #fff;
  position: relative;
}
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 55%);
}
.slide-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.slide-text strong { font-size: 22px; }
.slide-text span { font-size: 14px; opacity: 0.92; }

.slide-1 { background: linear-gradient(135deg, #5B8DEF, #A366F0); }
.slide-2 { background: linear-gradient(135deg, #F0A64D, #EF6C7D); }
.slide-3 { background: linear-gradient(135deg, #34C29A, #3D6BD0); }
.slide-4 { background: linear-gradient(135deg, #A366F0, #E75FA0); }
.slide-5 { background: linear-gradient(135deg, #3D6BD0, #34C29A); }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.32);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }
.slider-arrow:hover { background: rgba(0,0,0,0.5); }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}
.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}
.slider-dot.active { background: #fff; width: 18px; border-radius: 4px; }

.notice-box { flex: 1 1 38%; min-width: 0; display: flex; flex-direction: column; }
.notice-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.notice-list li a { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; }
.notice-list li a:hover { color: var(--accent-dark); }
.notice-dot { color: var(--accent3); font-size: 8px; }

.notice-tag {
  display: inline-block;
  background: var(--accent3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

.section-block { margin-top: 36px; }
.section-block h2 { font-size: 17px; margin: 0; }

.board-tag {
  display: inline-block;
  background: rgba(91,141,239,0.14);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}
.board-tag.tag-anon { background: rgba(163,102,240,0.16); color: var(--accent2); }

.shop-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.shop-preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(20,30,60,0.06);
}
.shop-preview-card:hover { border-color: var(--accent); }
.shop-preview-icon { font-size: 32px; margin-bottom: 8px; }
.shop-preview-name {
  font-weight: 700;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 메인화면 사진게시판 가로 스트립 */
.photo-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.photo-strip-item { flex: 0 0 140px; scroll-snap-align: start; }
.photo-strip-thumb {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--nav-hover);
  border: 1px solid var(--border);
}
.photo-strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-strip-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; opacity: 0.35;
}
.photo-strip-title {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-preview-price { color: var(--accent-dark); font-weight: 700; font-size: 13px; margin-top: 4px; }

/* --- 메인화면: 2단 레이아웃(본문 + 우측 사이드바) --- */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.main-col { min-width: 0; }
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 76px;
}

.user-card { display: flex; flex-direction: column; gap: 14px; }
.user-card-name { font-size: 17px; font-weight: 800; }
.user-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.user-stat { display: flex; flex-direction: column; gap: 2px; align-items: center; border-radius: 8px; padding: 2px 0; }
a.user-stat { transition: background 0.13s ease; }
a.user-stat:hover { background: rgba(91,141,239,0.12); }
a.user-stat .label { text-decoration: underline; text-decoration-color: var(--border); }
.user-stat .num { font-size: 17px; font-weight: 800; color: var(--accent-dark); }
.user-stat .label { font-size: 11px; color: var(--muted); }
.user-points-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.user-card-actions { display: flex; gap: 8px; }
.user-card-actions button, .user-card-actions .btn { font-size: 13px; padding: 8px 10px; }

.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ranking-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ranking-list li.me { background: rgba(91,141,239,0.1); border-radius: 8px; padding: 4px 6px; margin: 0 -6px; font-weight: 700; }
.rank-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  background: var(--bg);
  color: var(--muted);
  flex-shrink: 0;
}
.rank-num.rank-1 { background: #F5C542; color: #5a4200; }
.rank-num.rank-2 { background: #C9CDD6; color: #3a3d45; }
.rank-num.rank-3 { background: #DDA36A; color: #4a2e10; }
.rank-nick { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-points { color: var(--accent-dark); font-weight: 700; font-size: 13px; }

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar-col { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-col .card { flex: 1 1 260px; }
}

@media (max-width: 720px) {
  .hero-row { flex-direction: column; }
  .slider-track { height: 200px; }
  .notice-box { max-height: 220px; }
  .sidebar-col { flex-direction: column; }
}

/* --- 게임 게시판 --- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.game-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 22px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(20,30,60,0.06);
  transition: transform 0.13s ease, box-shadow 0.13s ease, border-color 0.13s ease;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(60,50,150,0.16); }
.game-card-icon { font-size: 46px; margin-bottom: 12px; }
.game-card-name { font-weight: 800; font-size: 17px; }
.game-card-desc { font-size: 13px; color: var(--muted); margin-top: 6px; }
.game-type-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.game-type-tag.type-chance { background: rgba(240,166,77,0.18); color: var(--accent3); }
.game-type-tag.type-skill { background: rgba(91,141,239,0.14); color: var(--accent-dark); }

.game-table {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.game-hand {
  flex: 1;
  background: var(--bg);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
}
.game-hand-label { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.game-cards { font-size: 22px; letter-spacing: 4px; min-height: 30px; }
.game-total { font-size: 12px; color: var(--muted); margin-top: 6px; }

.game-result {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 14px;
}
.game-result.win { color: #2FAE5B; background: rgba(47,174,91,0.1); }
.game-result.lose { color: var(--danger); background: rgba(229,72,77,0.1); }

.chip-row, .bet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.chip-btn, .bet-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.chip-btn.active, .bet-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.bet-btn { flex: 1; text-align: center; }

.slot-reels {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.slot-cell {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.slot-cell.spinning {
  animation: slotSpinBlur 0.07s linear infinite;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,141,239,0.18);
}
@keyframes slotSpinBlur {
  0% { transform: translateY(-3px); filter: blur(1.5px); }
  50% { transform: translateY(3px); filter: blur(1.5px); }
  100% { transform: translateY(-3px); filter: blur(1.5px); }
}
.slot-cell.landed {
  animation: slotLand 0.26s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slotLand {
  0% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* --- 바카라: 카드 비주얼 --- */
.card-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 84px;
  align-items: center;
}
.playing-card {
  width: 54px;
  height: 78px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 4px 10px rgba(20,20,40,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.15s ease;
}
.playing-card .rank { font-size: 19px; line-height: 1.1; }
.playing-card .suit { font-size: 20px; line-height: 1.1; margin-top: 2px; }
.playing-card.red { color: #E5484D; }
.playing-card.black { color: #1c1c1e; }
.playing-card.back {
  background: repeating-linear-gradient(45deg, var(--accent) 0 6px, var(--accent2) 6px 12px);
  border-color: transparent;
}

@keyframes gameResultPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.game-result.pop { animation: gameResultPop 0.35s cubic-bezier(.34,1.56,.64,1); }

/* --- 카지노 칩 스타일 --- */
.chip-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: repeating-radial-gradient(circle, var(--card) 0 14px, var(--bg) 14px 16px);
  border: 2px dashed var(--border);
}
.chip-btn.active {
  background: repeating-radial-gradient(circle, var(--accent) 0 14px, var(--accent-dark) 14px 16px);
  border-color: #fff;
  color: #fff;
  transform: scale(1.08);
}

@keyframes shakeEffect {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shakeEffect 0.35s ease; }

/* --- 상태 태그 (공용) --- */
.status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.status-tag.active { background: rgba(47,174,91,0.14); color: #2FAE5B; }
.status-tag.sold { background: rgba(107,107,114,0.16); color: var(--muted); }
.status-tag.banned { background: rgba(229,72,77,0.14); color: var(--danger); }
.status-tag.suspended { background: rgba(240,166,77,0.16); color: var(--accent3); }

/* --- 관리자 --- */
.admin-subnav { display: flex; gap: 8px; margin: 14px 0 20px; flex-wrap: wrap; }
.admin-subnav a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}
.admin-subnav a:hover { border-color: var(--accent); }
.admin-badge {
  background: var(--accent2);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.admin-inline-form { display: flex; align-items: center; gap: 6px; }
.admin-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; min-width: 260px; }
.admin-actions input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; }
.admin-actions button, .admin-inline-form button { font-size: 12px; padding: 6px 12px; }
button.danger, .btn.danger { background: rgba(229,72,77,0.12); color: var(--danger); border: 1px solid rgba(229,72,77,0.3); }
button.danger:hover { background: rgba(229,72,77,0.22); }
details summary { cursor: pointer; font-size: 12px; color: var(--accent-dark); font-weight: 700; }

/* --- 벙게시판 --- */
.meetup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.meetup-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(20,30,60,0.06);
  transition: transform 0.13s ease, box-shadow 0.13s ease, border-color 0.13s ease;
}
.meetup-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(60,50,150,0.16); }
.meetup-card-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--nav-hover); }
.meetup-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meetup-card-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--muted); opacity: 0.5;
}
.meetup-card-status { position: absolute; top: 10px; left: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.meetup-card-body { padding: 16px 18px 18px; }
.meetup-card-title { font-weight: 800; font-size: 15px; margin: 0 0 8px; }
.meetup-card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.meetup-detail-image { width: 100%; border-radius: 12px; margin: 4px 0 16px; display: block; }

.attendee-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.attendee-chip {
  background: rgba(91,141,239,0.12);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.attendee-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg);
}
.attendee-check-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.attendee-check-item input { width: auto; }

.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.photo-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* --- 마켓 --- */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.market-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(20,30,60,0.06);
}
.market-card:hover { border-color: var(--accent); }
.market-card-image { width: 100%; aspect-ratio: 1; background: var(--bg); }
.market-card-image img { width: 100%; height: 100%; object-fit: cover; }
.market-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.market-card-title { font-weight: 700; font-size: 14px; padding: 10px 12px 0; }
.market-card-price { color: var(--accent-dark); font-weight: 800; padding: 4px 12px 0; }
.market-card-meta { font-size: 12px; color: var(--muted); padding: 4px 12px 12px; }
.market-code-box { background: var(--bg); border: 1px dashed var(--accent); border-radius: 8px; padding: 12px; margin-top: 14px; }
.market-code { font-family: monospace; font-size: 16px; font-weight: 700; letter-spacing: 1px; word-break: break-all; }

.admin-reveal {
  display: inline-block;
  background: rgba(163,102,240,0.14);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}
.op-badge {
  display: inline-block;
  background: rgba(91,141,239,0.16);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}
.hot-tag {
  display: inline-block;
  background: rgba(229,72,77,0.14);
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.recommend-row { margin: 18px 0; text-align: center; }
.recommend-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.recommend-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); background: transparent; }
.recommend-btn.on {
  background: rgba(91,141,239,0.12);
  border-color: var(--accent);
  color: var(--accent-dark);
}
.recommend-btn:disabled { opacity: 0.5; cursor: default; }
.recommend-count { font-weight: 800; margin-left: 2px; }

/* 닉네임 장식 (뱃지 · 칭호) */
.uname { white-space: nowrap; }
.uname-badge { font-size: 1em; }
.uname-badge-img {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -0.2em;
  border-radius: 3px;
}
.uname-title {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 7px;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  border-radius: 999px;
  vertical-align: middle;
}

.market-image-locked {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0;
}

/* --- 알림 벨 --- */
.notif-bell {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(20,30,60,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-bell:hover { background: var(--accent-dark); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}
.notif-panel {
  position: fixed;
  bottom: 86px;
  right: 24px;
  z-index: 60;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20,30,60,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-panel-header {
  padding: 14px 16px;
  font-weight: 800;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-list { overflow-y: auto; }
.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(91,141,239,0.08); }
.notif-item-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* --- 사진게시판 --- */
.photo-category-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.photo-category-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-category-option {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.photo-category-option input { position: absolute; opacity: 0; pointer-events: none; }
.photo-category-option:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.post-row-photo { gap: 12px; }
.post-row-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* 사진게시판 카드 그리드 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.photo-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(60,50,150,0.05);
  transition: transform 0.13s ease, box-shadow 0.13s ease;
}
.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(60,50,150,0.16);
}
.photo-card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--nav-hover);
}
.photo-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  opacity: 0.35;
}
.photo-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  margin: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.photo-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.photo-card-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photo-card-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo-card-title { font-size: 13px; }
}
.photo-thumb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; }
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.photo-gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}
.notif-item-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* --- 합주게시판 --- */
.jam-record-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
  text-align: center;
}
.jam-record-btn {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.jam-record-btn:hover { opacity: 0.9; }
.jam-recording-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}
.jam-rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  animation: jam-pulse 1s ease-in-out infinite;
}
@keyframes jam-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.jam-voice-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.jam-voice-check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.jam-offset-row { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; }
.jam-offset-slider { flex: 1; max-width: 220px; }
.jam-offset-value { font-size: 12px; color: var(--muted); min-width: 54px; }
.jam-play-controls { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.jam-play-controls button:not(.btn) {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
}
.jam-lyrics-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  max-height: 220px;
  overflow-y: auto;
  text-align: center;
}
.jam-lyric-line {
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, font-size 0.2s ease;
}
.jam-lyric-line.active {
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 17px;
}
.jam-lyrics-editor {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}
.jam-tapsync-details { margin-top: 14px; }
.jam-tapsync-details summary { cursor: pointer; font-size: 13px; color: var(--accent-dark); }
