:root {
  --blue-900: #0b2f73;
  --blue-700: #1459c7;
  --blue-500: #2c9cf0;
  --blue-400: #5bbcff;
  --gold: #ffc61a;
  --gold-dark: #e6a800;
  --bg: #eaf4fd;
  --line: #cfe1f3;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; background: var(--bg); color: #1b2a40; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; min-height: 100vh; }

/* 상단: 풀화면 */
header { box-shadow: 0 3px 10px rgba(11, 47, 115, .18); position: relative; z-index: 2; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 28px; background: #fff; border-bottom: 4px solid var(--gold); }
.logo { display: inline-flex; align-items: center; white-space: nowrap; }
.logo img { height: 72px; width: auto; display: block; }
.top-right { display: flex; gap: 20px; align-items: center; font-size: 14px; color: #4a5a70; }
.top-right > span { white-space: nowrap; }
.top-right a:hover { color: var(--blue-700); }
.account a { margin-left: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 700; border: 2px solid var(--blue-500); color: var(--blue-700); }
.account a:last-child { background: var(--blue-500); color: #fff; }
.account a:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

.menu { display: flex; justify-content: center; background: linear-gradient(90deg, var(--blue-900), var(--blue-700) 55%, var(--blue-500)); padding: 0 20px; }
.menu a { padding: 14px 26px; color: #eaf5ff; font-weight: 700; font-size: 15px; border-bottom: 4px solid transparent; transition: background .15s; }
.menu a:hover { background: rgba(255, 255, 255, .15); }
.ico { display: inline-block; margin-right: 6px; font-size: 1.1em; vertical-align: -1px; }
/* 전체 랭킹 메뉴: 포인트 컬러 */
.menu a.featured { color: var(--gold); margin: 0 6px; border-radius: 10px 10px 0 0; }
.menu a.featured .ico { animation: bob 1.6s ease-in-out infinite; }
/* 음영(어두운 배경·글로우)은 선택된 전체 메뉴에서만 */
.menu a.featured.active { color: #fff; background: rgba(0, 0, 0, .3); text-shadow: 0 0 10px rgba(255, 198, 26, .5); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.menu a.active { color: #fff; background: rgba(255, 255, 255, .12); border-bottom-color: var(--gold); }

/* 본문: [캐릭터 | 리스트(가운데 1000px) | 여백] 3열 */
.page { display: grid; grid-template-columns: 1fr minmax(0, 1000px) 1fr; gap: 24px; padding: 24px 20px; align-items: start; }
.page main { grid-column: 2; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(11, 47, 115, .1); }
main h2 { margin: 0 0 14px; font-size: 22px; color: var(--blue-900); display: flex; align-items: center; gap: 8px; }
main h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--gold), var(--blue-500)); }

/* 왼쪽 열: 프로필 카드 위, 캐릭터 카드 아래 */
.side { grid-column: 1; justify-self: end; width: 230px; display: grid; gap: 14px; }

.profile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(11, 47, 115, .1); }
.pf-img { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700)); color: #fff; font-size: 24px; font-weight: 800; border: 3px solid var(--gold); }
.pf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-img.guest { background: #dbe7f5; color: #7a8aa0; border-color: #c4d3e6; }
.pf-name { font-weight: 800; font-size: 16px; color: var(--blue-900); word-break: break-all; }
.pf-login { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.profile > .pf-name { flex: 1; min-width: 0; }

.player { border-radius: 16px; padding: 20px 18px; text-align: center; color: #fff;
  background: linear-gradient(160deg, var(--blue-500), var(--blue-900)); box-shadow: 0 4px 14px rgba(11, 47, 115, .3); }
/* 캐릭터 이미지: 흰 배경 이미지라 둥근 액자(골드 테두리) 안에 통째로 보여준다 */
.avatar { width: 100%; aspect-ratio: 1 / 1; margin: 0 auto; background: #fff; border-radius: 18px; border: 3px solid var(--gold);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25), inset 0 0 0 2px rgba(44, 156, 240, .15); overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: contain; }
.p-name { margin: 12px 0 14px; font-weight: 800; font-size: 17px; }
.lv { display: inline-block; background: var(--gold); color: #5a3d00; padding: 1px 9px; border-radius: 999px; font-size: 13px; margin-right: 6px; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; margin: 0; padding: 10px 12px; background: rgba(0, 0, 0, .22); border-radius: 10px; text-align: left; font-size: 14px; }
.stats dt { color: #cfe6ff; }
.stats dd { margin: 0; text-align: right; font-weight: 800; color: #fff; }
.stats dt:first-of-type + dd { color: #ffd2cc; }
.stats dt:last-of-type + dd { color: #bfe3ff; }

/* 캐릭터 패널 상단: 성장력포인트(윗줄) · 강화석 / 진화석(아랫줄) */
.resources { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.resources > div:first-child { grid-column: 1 / -1; }
.resources > div { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 7px 6px; display: flex; flex-direction: column; gap: 2px; }
.resources .rl { font-size: 11px; color: #cfe6ff; }
.resources strong { font-size: 16px; color: var(--gold); font-weight: 800; }

/* 장비 강화 단계(공격력·방어력 아래, 강화 버튼 위) */
.gear { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 8px 0 0; padding: 8px 12px; background: rgba(255, 198, 26, .16); border: 1px solid rgba(255, 198, 26, .45); border-radius: 10px; text-align: left; font-size: 14px; }
.gear dt { color: #fff3c4; }
.gear dd { margin: 0; text-align: right; font-weight: 800; color: var(--gold); }

/* 강화 버튼(방어력 하단) */
.enhance { display: block; width: 100%; margin-top: 12px; padding: 10px 0; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px; color: #5a3d00;
  background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); box-shadow: 0 3px 0 #b88200; transition: transform .1s, box-shadow .1s; }
.enhance:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 #b88200; }
.enhance:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #b88200; }
.enhance:disabled { cursor: not-allowed; background: #9db3a7; color: #eef6f1; box-shadow: 0 3px 0 #7c9187; }

/* 캐릭터 패널: 소속판 / 자주가는 게시판 */
.mybooks { margin-top: 16px; text-align: left; }
.mybooks h3 { margin: 0 0 6px; font-size: 13px; color: var(--gold); letter-spacing: .5px; }
.mybooks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mybooks li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 600; color: #fff; }
.mybooks li a:hover { background: rgba(255, 255, 255, .28); }
.mybooks .blv { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: #5a3d00; font-size: 11px; font-weight: 800; }
.mybooks .none { font-size: 12px; color: #cfe6ff; padding: 4px 10px; }

/* 리스트 */
.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { background: linear-gradient(var(--blue-500), var(--blue-700)); color: #fff; padding: 11px 8px; font-weight: 700; }
.list th:first-child { border-top-left-radius: 8px; }
.list th:last-child { border-top-right-radius: 8px; }
.list td { border-bottom: 1px solid var(--line); padding: 11px 8px; }
.list tbody tr:nth-child(even) { background: #f3f8fe; }
.list tbody tr:hover { background: #dcecfd; }
.c-tab { width: 76px; text-align: center; }
.c-author { width: 110px; text-align: center; font-weight: 600; color: var(--blue-700); }
.c-date { width: 100px; text-align: center; color: #7a8aa0; }
.c-num { width: 72px; text-align: center; color: #5a6a82; }
.c-title a { font-weight: 600; }
.c-title a:hover { color: var(--blue-700); text-decoration: underline; }
.list td.c-num:last-child { color: #e8453c; font-weight: 700; }

/* 헤더 계정 영역(로그인 후) */
.account a.me { font-weight: 700; color: var(--blue-900); margin-right: 4px; padding: 0; border: 0; border-radius: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.account a.me:hover { background: none; color: var(--blue-700); }
.account a.console { background: var(--gold); border-color: var(--gold-dark); color: #5a3d00; }
.account a.console:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.logout { display: inline; margin: 0 0 0 8px; }
.logout button { cursor: pointer; font: inherit; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--blue-500); background: #fff; color: var(--blue-700); }
.logout button:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

/* 회원가입: 이메일 인증 */
.auth-form .field { display: grid; gap: 5px; }
.auth-form .field > label { font-weight: 700; font-size: 14px; color: var(--blue-900); }
.auth-form .row { display: flex; gap: 8px; }
.auth-form .row input { flex: 1; min-width: 0; }
.auth-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-form fieldset:disabled { opacity: .45; }
.btn-ghost { flex: none; cursor: pointer; padding: 0 14px; border-radius: 10px; border: 2px solid var(--blue-500); background: #fff; color: var(--blue-700); font: inherit; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn-ghost:hover:not(:disabled) { background: var(--blue-500); color: #fff; }
.btn-ghost:disabled { cursor: not-allowed; opacity: .5; }
.verify-msg { margin: 0; min-height: 1.2em; font-size: 13px; font-weight: 700; }
.verify-msg.ok { color: #17673f; }
.verify-msg.err { color: #b3261e; }
[hidden] { display: none !important; }

/* 로그인 / 회원가입 */
.page main.auth-card { max-width: 440px; width: 100%; margin: 0 auto; padding: 28px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; color: var(--blue-900); }
.auth-form input { padding: 11px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; font-weight: 400; }
.auth-form input:focus { outline: 2px solid var(--blue-400); border-color: var(--blue-500); }
.auth-form small { font-weight: 400; color: #6c7d93; font-size: 12px; }
.btn-primary { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 800; color: #fff; background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); box-shadow: 0 3px 0 var(--blue-900); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-small { cursor: pointer; border: 0; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; color: #5a3d00; background: var(--gold); }
.auth-sub { text-align: center; margin: 16px 0 0; font-size: 14px; }
.auth-sub a { color: var(--blue-700); font-weight: 700; }
.notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
ul.notice { list-style: none; display: grid; gap: 4px; }
.notice.err { background: #ffe9e9; color: #b3261e; border: 1px solid #f5b5b0; }
.notice.ok { background: #e3f6ec; color: #17673f; border: 1px solid #b4e2c8; }

/* 관리자 콘솔 */
.admin-menu { justify-content: center; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 10px; }
.dash-card { padding: 22px 20px; border-radius: 16px; color: #fff; background: linear-gradient(160deg, var(--blue-500), var(--blue-900)); box-shadow: 0 4px 14px rgba(11, 47, 115, .3); }
.dash-card:nth-child(2) { background: linear-gradient(160deg, #14b8a6, #0b5d6b); }
.dash-card:nth-child(3) { background: linear-gradient(160deg, #8b5cf6, #3b2a8f); }
.dash-label { font-size: 14px; font-weight: 700; opacity: .9; }
.dash-num { margin-top: 8px; font-size: 44px; font-weight: 800; line-height: 1.1; color: var(--gold); }
.admin .card { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.admin .card h3 { margin: 0 0 12px; font-size: 16px; color: var(--blue-900); }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 700; color: var(--blue-900); }
.inline-form input { width: 140px; padding: 9px 10px; border: 1px solid #b9cde3; border-radius: 8px; font: inherit; }
.hint { display: block; margin-top: 8px; color: #6c7d93; }
.scroll { overflow-x: auto; }
.admin-table { font-size: 13px; white-space: nowrap; }
.admin-table td, .admin-table th { padding: 8px 10px; text-align: left; }
.admin-table .strong { font-weight: 700; color: var(--blue-900); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: #7a8aa0; }
.badge.b-admin { background: var(--blue-700); }
.badge.b-ok { background: #1aa56b; }
.badge.b-locked { background: #e8453c; }
.badge.b-user { background: #7a8aa0; }

/* 게시판 랭킹 */
.rank .c-rank { width: 80px; text-align: center; }
.rank .c-title { padding-left: 16px; font-size: 16px; }
.rank .c-num { width: 100px; }
.rank td { padding: 14px 8px; }
.rank tr.podium { background: #fffbea; }
.rank tr.podium .c-title a { font-weight: 800; }
.medal { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #dcecfd; color: var(--blue-700); font-weight: 800; }
.medal.m1 { background: linear-gradient(135deg, #ffe27a, var(--gold-dark)); color: #5a3d00; }
.medal.m2 { background: linear-gradient(135deg, #f1f4f6, #b4bcc4); color: #3d464d; }
.medal.m3 { background: linear-gradient(135deg, #f3c9a0, #c9803f); color: #4d2a0a; }
.rank .c-cat { width: 150px; text-align: center; }
.rank .c-join { width: 130px; text-align: center; }
.lvchip { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--gold); color: #5a3d00; font-weight: 800; font-size: 13px; }
.join { display: inline-block; padding: 3px 11px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; }
.join.j-free { background: var(--blue-500); }
.join.j-approval { background: #14b8a6; }
.join.j-invite { background: #9b51e0; }
.cat-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #dcecfd; color: var(--blue-900); font-size: 13px; font-weight: 700; }
.cat-chip:hover { background: var(--blue-400); color: #fff; }
.empty { text-align: center; color: #7a8aa0; padding: 30px 0; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blue-500); color: #fff; font-size: 12px; font-weight: 700; }
.tag[data-tab="공지"] { background: #ef4b4b; }
.tag[data-tab="정보"] { background: #14b8a6; }
.tag[data-tab="후기"] { background: #9b51e0; }
.tag[data-tab="질문"] { background: #f2994a; }
.tag[data-tab="자유"] { background: var(--blue-500); }

@media (max-width: 1300px) {
  .page { grid-template-columns: 1fr; }
  .page main, .side { grid-column: 1; }
  .side { justify-self: stretch; width: auto; }
  .player { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; text-align: left; padding: 12px 18px; }
  .mybooks { flex: 1 1 220px; margin-top: 0; }
  .resources { flex: 1 1 100%; margin-bottom: 0; }
  .enhance { width: auto; margin-top: 0; padding: 10px 22px; }
  .gear { margin-top: 0; grid-template-columns: auto auto; }
  .avatar { width: 84px; height: 84px; flex: none; margin: 0; border-width: 2px; border-radius: 14px; }
  .p-name { margin: 0; }
  .stats { margin-left: auto; grid-template-columns: auto auto; }
}
@media (max-width: 700px) {
  .top { flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
  .top-right { gap: 12px; font-size: 13px; }
  .page { padding: 12px; gap: 12px; }
  .page main { padding: 12px; }
  .c-author, .c-date { display: none; }
  .menu { overflow-x: auto; padding: 0; justify-content: flex-start; }
  .menu a { padding: 12px 16px; white-space: nowrap; }
}

/* 자동 로그인 체크박스 */
.auth-form .remember { display: grid; gap: 4px; }
.auth-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.auth-form label.check input { width: 18px; height: 18px; padding: 0; accent-color: var(--blue-500); }

/* 관리자 콘솔 레이아웃: 왼쪽 메뉴 + 본문 */
.admin-page { display: flex; align-items: flex-start; gap: 20px; width: 100%; max-width: 1240px; margin: 0 auto; }
.admin-page main { flex: 1; min-width: 0; max-width: none; }
.admin-side { flex: none; width: 200px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(11, 47, 115, .1); }
.admin-side h3 { margin: 0 0 10px; padding: 0 6px; font-size: 13px; letter-spacing: .5px; color: #6c7d93; }
.admin-side nav { display: grid; gap: 4px; }
.admin-side nav a { display: block; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--blue-900); }
.admin-side nav a:hover { background: #dcecfd; }
.admin-side nav a.active { color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.side-empty { margin: 0; padding: 8px 12px; font-size: 13px; color: #7a8aa0; }
@media (max-width: 900px) {
  .admin-page { flex-direction: column; }
  .admin-side { width: 100%; }
  .admin-side nav { display: flex; overflow-x: auto; }
  .admin-side nav a { white-space: nowrap; }
}

/* 게시판 회장(닉네임) 컬럼 */
.rank .c-owner { width: 130px; text-align: center; font-weight: 700; color: var(--blue-700); word-break: break-all; }
.rank th.c-owner { color: #fff; }

/* 판 만들기 */
.rank-actions { display: flex; justify-content: flex-end; margin: -6px 0 12px; }
.btn-create { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #5a3d00; background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); box-shadow: 0 3px 0 #b88200; }
.btn-create:hover { filter: brightness(1.06); }
.btn-create:active { transform: translateY(2px); box-shadow: 0 1px 0 #b88200; }
.auth-form select { padding: 11px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; background: #fff; }
.auth-form select:focus { outline: 2px solid var(--blue-400); border-color: var(--blue-500); }
.rank .exp { color: #2f7d4f; font-weight: 700; }
.auth-form.is-disabled .btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }

/* 관리자: 판 관리 화면, 빈 목록 안내 */
.empty-note { margin: 6px 0; padding: 18px 0; text-align: center; color: #6c7d93; font-weight: 700; }
.badge.b-warn { background: #f2994a; }
.back-link { color: var(--blue-700); font-weight: 700; font-size: 14px; }
.back-link:hover { text-decoration: underline; }
.info-grid { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; margin: 0; align-items: center; font-size: 14px; }
.info-grid dt { color: #6c7d93; font-weight: 700; }
.info-grid dd { margin: 0; font-weight: 700; color: var(--blue-900); }
.status-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.status-actions form { margin: 0; }
.btn-status { cursor: pointer; border: 0; border-radius: 10px; padding: 10px 22px; font: inherit; font-weight: 800; color: #fff; }
.btn-status.st-normal { background: #1aa56b; }
.btn-status.st-suspended { background: #f2994a; }
.btn-status.st-deleted { background: #e8453c; }
.btn-status:disabled { opacity: .35; cursor: not-allowed; }
a.btn-small { display: inline-block; text-decoration: none; }

/* 관리 > 캐릭터관리 */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.head-row h2, .head-row h3 { margin: 0; }
.char-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #fff; border: 2px solid var(--gold); display: block; }
.char-form .field { display: grid; gap: 6px; margin-bottom: 12px; }
.char-form .field > label { font-weight: 700; font-size: 14px; color: var(--blue-900); }
.char-form input[type=text], .char-form input[type=number] { padding: 10px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; width: 100%; max-width: 420px; }
.char-form input:focus { outline: 2px solid var(--blue-400); border-color: var(--blue-500); }
.img-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.char-preview { width: 80px; height: 80px; object-fit: contain; border-radius: 12px; background: #fff; border: 2px solid var(--line); }
.stage-row { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbff; }
.stage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stage-no { color: var(--blue-700); font-size: 15px; }
.stage-remove { cursor: pointer; border: 0; border-radius: 8px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 700; color: #fff; background: #e8453c; }
.stage-remove:disabled { opacity: .35; cursor: not-allowed; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; }
.stage-grid .field { margin-bottom: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.btn-ghost { display: inline-flex; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; max-width: 520px; }
.stat-grid .field { margin-bottom: 4px; }
.btn-small.btn-danger { background: #e8453c; color: #fff; }
.danger-zone { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed #f0a6a2; border-radius: 12px; background: #fff6f5; }
.danger-zone .hint { margin: 0; }
.stat-title { margin: 10px 0 2px; font-weight: 800; font-size: 14px; color: var(--blue-700); }

/* 관리 > 확률설정(뽑기) */
.item-picker { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
.item-picker select { flex: 1; min-width: 220px; max-width: 420px; padding: 10px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; background: #fff; }
.gacha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbff; }
.gacha-row.is-missing { border-color: #f0a6a2; background: #fff6f5; }
.gacha-row .item-thumb { width: 44px; height: 44px; }
.gacha-row .item-name { flex: 1; min-width: 120px; color: var(--blue-900); }
.gacha-row .rate { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--blue-700); }
.gacha-row .rate input { width: 120px; padding: 8px 10px; border: 1px solid #b9cde3; border-radius: 8px; font: inherit; }
.rate-total { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-weight: 700; background: #eef3f9; color: #4a5a70; }
.rate-total.ok { background: #e3f6ec; color: #17673f; }
.rate-total.bad { background: #ffe9e9; color: #b3261e; }
.rate-total strong { font-size: 18px; }

/* 장비 등급 줄: 등급색 선택 */
.color-input { width: 64px; height: 38px; padding: 2px; cursor: pointer; }

/* 전용 여부 셀렉트박스 */
.exclusive-box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, #f3f8ff, #fff8e6); max-width: 520px; }
.exclusive-box > label { font-weight: 800; color: var(--blue-700); }
.fancy-select { appearance: none; -webkit-appearance: none; width: 100%; padding: 11px 42px 11px 14px; font-size: 15px; font-weight: 700; color: #1f2d4d; cursor: pointer;
    border: 2px solid var(--blue-700); border-radius: 12px; box-shadow: 0 2px 6px rgba(30, 80, 160, .15);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231e50a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.fancy-select:hover { box-shadow: 0 3px 10px rgba(30, 80, 160, .25); }
.fancy-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 190, 40, .3); }

/* 등급 설정 가져오기 */
.import-box { margin: 10px 0 4px; }
.import-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 520px; }
.import-row .fancy-select { flex: 1 1 220px; width: auto; }

/* 회원가입 지급 설정 */
.gift-box { padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffaf0; max-width: 520px; }
.gift-check { display: flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; color: var(--blue-700); }
.gift-check input { width: 18px; height: 18px; }
.gift-count { margin-top: 8px; }
.gift-count input { max-width: 140px; }
.gift-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #ffe9a8; color: #7a5200; font-weight: 800; font-size: 13px; }

/* 등급관리 */
.grade-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grade-form input[type=text] { flex: 1 1 200px; max-width: 260px; }
.grade-chip { display: inline-block; padding: 3px 14px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.grade-pick { display: flex; align-items: center; gap: 8px; }
.grade-pick .grade-chip { width: 26px; height: 26px; padding: 0; flex: 0 0 auto; border: 2px solid #fff; box-shadow: 0 0 0 1px #c7d1e3; }
.grade-pick .fancy-select { padding: 8px 36px 8px 12px; }

/* 닉네임 드롭다운(내 정보 메뉴): 마우스를 올리거나 포커스하면 펼쳐진다 */
.me-menu { position: relative; display: inline-block; }
.me-drop { display: none; position: absolute; right: 0; top: 100%; z-index: 60; padding-top: 8px; min-width: 150px; }
.me-drop-inner { display: block; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(11, 47, 115, .22); }
.me-menu:hover .me-drop, .me-menu:focus-within .me-drop { display: block; }
.account .me-drop a { display: block; margin: 0; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--blue-900); font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none; }
.account .me-drop a:hover, .account .me-drop a:last-child:hover { background: #dcecfd; color: var(--blue-900); }
.account .me-drop a:last-child { background: none; color: var(--blue-900); border: 0; }

/* 내 정보 화면 */
.account-password .auth-form { max-width: 420px; }
.profile-card { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; font-size: 40px; font-weight: 800; flex: none; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.profile-info dt { font-weight: 800; color: #6c7d93; }
.profile-info dd { margin: 0; font-weight: 700; color: var(--blue-900); }
.points-badge { display: inline-block; padding: 3px 14px; border-radius: 999px; background: #ffe9a8; color: #7a5200; font-weight: 800; }

/* 포인트설정 */
.points-form { display: grid; gap: 14px; max-width: 460px; }
.points-form > label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; color: var(--blue-900); }
.points-input { display: flex; align-items: center; gap: 8px; }
.points-input input { flex: 1; padding: 10px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; font-weight: 400; min-width: 0; }
.points-input em { font-style: normal; font-weight: 800; color: #7a5200; }

/* 내 정보 > 캐릭터: 캐릭터·무기·방어구·세트효과 배치 (진한 남색 무대 + 금빛 테두리) */
.admin .hero-board { position: relative; overflow: hidden; padding: 26px 22px 20px; border: 2px solid #e3b341;
    background: radial-gradient(ellipse at 50% 0%, #2f6fd6 0%, #123a8c 38%, #0a1f5c 100%);
    box-shadow: 0 8px 28px rgba(10, 31, 92, .45), inset 0 0 0 3px rgba(255, 224, 130, .35), inset 0 0 60px rgba(90, 170, 255, .25); }
.hero-board::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
    background-image: radial-gradient(2px 2px at 12% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 78% 14%, #cfe6ff, transparent),
        radial-gradient(2px 2px at 30% 70%, #ffe9a8, transparent), radial-gradient(1.5px 1.5px at 88% 62%, #fff, transparent),
        radial-gradient(2px 2px at 55% 88%, #cfe6ff, transparent), radial-gradient(1.5px 1.5px at 6% 90%, #ffe9a8, transparent); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.15fr) 40px minmax(0, 1fr);
    grid-template-areas: "weapon l1 char l2 armor" "weapon l3 set l4 armor"; gap: 12px 0; align-items: stretch; }
.slot-weapon { grid-area: weapon; } .slot-armor { grid-area: armor; } .slot-char { grid-area: char; } .slot-set { grid-area: set; }
.hero-link { align-self: center; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #7fc4ff, #ffe08a); box-shadow: 0 0 10px 2px rgba(127, 196, 255, .75); }
.hero-link.l1 { grid-area: l1; } .hero-link.l2 { grid-area: l2; } .hero-link.l3 { grid-area: l3; } .hero-link.l4 { grid-area: l4; }
.hero-slot { position: relative; padding: 14px 12px; text-align: center; border-radius: 16px; border: 4px solid #5aa8ff;
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(220, 236, 255, .95));
    box-shadow: 0 0 18px rgba(90, 168, 255, .55), 0 6px 16px rgba(0, 0, 0, .35); }
.slot-weapon[style], .slot-armor[style] { box-shadow: 0 0 22px 2px currentColor, 0 6px 16px rgba(0, 0, 0, .35); }
.slot-char { border-color: #e3b341; box-shadow: 0 0 26px rgba(255, 214, 102, .65), 0 6px 18px rgba(0, 0, 0, .4); }
.hero-slot h4 { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #123a8c; }
.hero-slot.empty { background: linear-gradient(180deg, rgba(20, 52, 128, .85), rgba(8, 24, 72, .92)); border-style: solid; border-color: rgba(127, 196, 255, .55); box-shadow: 0 0 16px rgba(90, 168, 255, .35), 0 6px 16px rgba(0, 0, 0, .35); }
.hero-slot.empty h4 { color: #bcd9ff; }
.slot-empty-img { display: block; width: 100%; max-width: 190px; margin: 0 auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .5)); }
.slot-empty-text { margin: 6px 0 2px; font-size: 13px; font-weight: 700; color: #bcd9ff; }
.slot-img { width: 96px; height: 96px; object-fit: contain; border-radius: 12px; background: radial-gradient(circle, #ffffff, #e3efff); box-shadow: inset 0 0 0 2px rgba(18, 58, 140, .12); }
.slot-img.big { width: 140px; height: 140px; border-radius: 16px; }
.slot-name { margin: 8px 0 4px; font-weight: 800; color: #0a1f5c; word-break: keep-all; }
.level-chip { display: inline-block; padding: 3px 14px; border-radius: 999px; background: linear-gradient(135deg, #ffd45e, #e3a008); color: #5a3d00; font-weight: 800; font-size: 13px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.slot-weapon .grade-chip, .slot-armor .grade-chip { box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.slot-stats { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; margin: 12px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(18, 58, 140, .08); font-size: 13px; text-align: left; }
.slot-stats dt { color: #4a5f86; font-weight: 700; } .slot-stats dd { margin: 0; font-weight: 800; color: #0a1f5c; text-align: right; }
.slot-stats dd.plus { color: #d4640a; }
.slot-set { background: none; border: 0; box-shadow: none; padding: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.set-orb { width: 150px; height: auto; filter: drop-shadow(0 0 14px rgba(255, 214, 102, .8)); }
.set-circle { width: 150px; height: 150px; border-radius: 50%; border: 4px solid #e3b341; background: radial-gradient(circle, #fff8e0, #ffd45e); display: flex; align-items: center; justify-content: center; font-size: 46px; box-shadow: 0 0 22px rgba(255, 214, 102, .8); }
.set-title { font-size: 13px; font-weight: 800; color: #ffe9a8; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.set-stats { display: flex; gap: 10px; font-size: 13px; color: #e8f1ff; font-weight: 700; }
.set-stats b { color: #ffd45e; }
.hero-total { position: relative; display: flex; gap: 14px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.total-box { min-width: 190px; padding: 12px 22px; border-radius: 16px; text-align: center; display: grid; gap: 2px; color: #fff;
    background: linear-gradient(135deg, #3b86ff, #1546b8); border: 2px solid #ffe08a; box-shadow: 0 0 18px rgba(127, 196, 255, .6), inset 0 0 14px rgba(255, 255, 255, .2); }
.total-box:nth-child(2) { background: linear-gradient(135deg, #17b890, #0a6e8c); }
.total-box span { font-size: 13px; font-weight: 700; color: #e8f1ff; } .total-box strong { font-size: 30px; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "char char" "weapon armor" "set set"; gap: 12px; }
  .hero-link { display: none; }
}

/* 등수: 남색 무대에 어울리는 유리 패널 + 금빛 숫자 */
.hero-rank { position: relative; display: flex; gap: 14px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.rank-plaque { display: flex; align-items: center; gap: 14px; min-width: 250px; flex: 1 1 250px; max-width: 340px; padding: 12px 18px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); border: 2px solid rgba(255, 224, 138, .8);
    box-shadow: 0 0 16px rgba(255, 214, 102, .35), inset 0 0 18px rgba(127, 196, 255, .2); backdrop-filter: blur(2px); }
.rank-icon { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff3c4, #e3a008 70%); box-shadow: 0 0 14px rgba(255, 214, 102, .8), inset 0 -3px 6px rgba(0, 0, 0, .2); }
.rank-body { display: grid; gap: 1px; min-width: 0; }
.rank-label { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #bcd9ff; }
.rank-sub { font-size: 12px; font-weight: 700; color: #e8f1ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-value { display: flex; align-items: baseline; gap: 3px; color: #ffd45e; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.rank-value b { font-size: 34px; line-height: 1.1; background: linear-gradient(180deg, #fff3c4, #ffc83d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank-value em { font-style: normal; font-size: 16px; font-weight: 800; }
.rank-value small { margin-left: 6px; font-size: 13px; font-weight: 700; color: #e8f1ff; }
.rank-value.none b { color: #8fa9d6; background: none; -webkit-background-clip: border-box; background-clip: border-box; }

/* 내 정보 > 캐릭터/무기·방어구 목록 */
.slot-stretch { position: absolute; inset: 0; z-index: 2; border-radius: 12px; }
.slot-stretch:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 3px rgba(255, 224, 138, .9); }
.hero-slot h4, .hero-slot .slot-img, .hero-slot .slot-empty-img { position: relative; }
.owned-table td, .owned-table th { text-align: center; vertical-align: middle; }
.owned-table td.strong { text-align: left; }
.owned-table td.plus { color: #d4640a; font-weight: 800; }
.owned-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #f3f8ff; border: 3px solid var(--line); }
.owned-table tr.is-active { background: #fffbea; }
.active-badge { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: linear-gradient(135deg, #ffd45e, #e3a008); color: #5a3d00; font-size: 12px; font-weight: 800; }
.empty-owned { text-align: center; padding: 10px 0 4px; }
.empty-owned img { width: 160px; max-width: 60%; filter: drop-shadow(0 4px 10px rgba(11, 47, 115, .3)); }
.empty-owned p { margin: 6px 0 0; color: #6c7d93; font-weight: 700; }

/* 알럿(대화상자) 공통 */
.alert-dialog { border: 0; border-radius: 18px; padding: 22px 24px; width: min(440px, calc(100vw - 32px)); background: #fff;
    box-shadow: 0 20px 60px rgba(8, 24, 72, .5), 0 0 0 3px rgba(255, 224, 138, .8); }
.alert-dialog::backdrop { background: rgba(8, 24, 72, .62); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dialog-head h3 { margin: 0; font-size: 18px; color: var(--blue-900); }
.dialog-close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #6c7d93; }
.dialog-close:hover { color: var(--blue-700); }
.alert-dialog .form-actions { display: flex; gap: 8px; margin-top: 14px; }
.alert-dialog .auth-form { margin-top: 6px; }
.profile-card { position: relative; }
.profile-edit-btn { position: absolute; top: 14px; right: 14px; }
.reset-msg { margin: 10px 0 0; font-size: 14px; font-weight: 700; }
.reset-msg.ok { color: #1f7a45; } .reset-msg.err { color: #c0392b; }
.auth-sub .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-700); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* 프로필 수정 버튼 */
.admin .profile-edit-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; font-size: 14px; color: #fff;
    background: linear-gradient(135deg, #3b86ff, #1546b8); border: 2px solid #ffe08a; box-shadow: 0 4px 12px rgba(21, 70, 184, .45), inset 0 0 10px rgba(255, 255, 255, .25);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .15s, box-shadow .15s; }
.admin .profile-edit-btn::before { content: "✏️"; font-size: 15px; }
.admin .profile-edit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(21, 70, 184, .55), inset 0 0 12px rgba(255, 255, 255, .35); background: linear-gradient(135deg, #5a9bff, #1d56d6); }
.admin .profile-edit-btn:active { transform: translateY(0); }

/* 가진 캐릭터·장비·아이템 카드 목록 (프로필의 칸과 같은 모양) */
.owned-board { padding: 22px 18px; }
.owned-board .stage-title { position: relative; margin: 0 0 14px; color: #ffe9a8; font-size: 16px; letter-spacing: 1px; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.owned-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.owned-grid form { margin: 0; display: flex; }
.owned-card { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; color: inherit; cursor: pointer; text-align: center;
    transition: transform .15s, filter .15s; }
.owned-card:hover:not(:disabled) { transform: translateY(-4px) scale(1.02); filter: brightness(1.05); }
.owned-card:disabled { cursor: default; }
.owned-card.is-current { border-color: #e3b341; box-shadow: 0 0 26px rgba(255, 214, 102, .75), 0 6px 18px rgba(0, 0, 0, .4); }
.owned-card .slot-stats { width: 100%; box-sizing: border-box; }
.owned-card.item-card { cursor: default; }
.owned-card.item-card .use-btn { margin-top: 10px; min-width: 110px; }
.active-badge.corner { position: absolute; top: 8px; right: 8px; margin: 0; }
.empty-owned.on-stage { position: relative; }
.empty-owned.on-stage p { color: #bcd9ff; }
.empty-owned.on-stage img { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .55)); }

/* 설정: 스위치 */
.settings-form { display: grid; gap: 16px; max-width: 520px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbff; cursor: pointer; }
.switch-text { display: grid; gap: 3px; } .switch-text strong { color: var(--blue-900); } .switch-text small { color: #6c7d93; }
.switch { position: relative; flex: none; width: 54px; height: 30px; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: #b9c6dc; transition: background .2s; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .2); }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.switch input:checked + .slider { background: linear-gradient(135deg, #3b86ff, #1546b8); }
.switch input:checked + .slider::after { transform: translateX(24px); }

/* 확인 알럿 문구, 가입 지급 내역 */
.confirm-msg { margin: 6px 0 4px; font-size: 16px; font-weight: 700; color: var(--blue-900); line-height: 1.5; word-break: keep-all; }
.grant-lead { margin: 4px 0 10px; font-weight: 700; color: var(--blue-900); }
.grant-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.grant-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, #fff8e0, #ffe9a8); border: 1px solid #e3b341; }
.grant-icon { font-size: 26px; width: 40px; text-align: center; }
.grant-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; }
.grant-name { flex: 1; font-weight: 800; color: #5a3d00; } .grant-list b { color: #b45309; font-size: 16px; }
.alert-dialog a.btn-primary { display: inline-block; text-decoration: none; text-align: center; }

/* 뽑기 결과 연출 */
.draw-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 45%, rgba(40, 90, 200, .88), rgba(5, 14, 48, .96)); }
.draw-overlay[hidden] { display: none; }
.draw-stage { position: relative; width: min(420px, 92vw); text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; }
.draw-rays { position: absolute; width: 520px; height: 520px; max-width: 160vw; border-radius: 50%; opacity: 0; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(255, 224, 138, .55) 0deg 8deg, transparent 8deg 24deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%); mask-image: radial-gradient(circle, #000 0%, transparent 70%); }
.draw-stage.anim .draw-rays { opacity: 1; animation: drawSpin 6s linear infinite; }
.draw-orb { position: relative; font-size: 96px; line-height: 1; filter: drop-shadow(0 0 26px #ffd45e); }
.draw-stage.anim .draw-orb { animation: drawPulse .9s ease-in-out infinite; }
.draw-status { position: relative; margin: 12px 0 0; font-weight: 800; letter-spacing: 1px; color: #ffe9a8; }
.draw-result { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.draw-result[hidden] { display: none; }
.draw-title { margin: 0; font-size: 22px; font-weight: 800; color: #ffe08a; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.draw-card { width: 230px; padding: 16px; border-radius: 18px; border: 4px solid #e3b341; display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(220, 236, 255, .96)); color: var(--blue-900); box-shadow: 0 0 34px rgba(255, 214, 102, .85), 0 10px 30px rgba(0, 0, 0, .5); }
.draw-card img { width: 150px; height: 150px; object-fit: contain; border-radius: 14px; background: radial-gradient(circle, #fff, #e3efff); }
.draw-card strong { font-size: 18px; }
.draw-card .slot-stats { width: 100%; box-sizing: border-box; }
.draw-stage.anim.revealed .draw-card { animation: drawPop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.draw-stage.anim.revealed .draw-title { animation: drawFade .6s .2s both; }
.draw-stage.anim.revealed .draw-rays { animation: drawSpin 6s linear infinite, drawFlash .9s ease-out; }
@keyframes drawSpin { to { transform: rotate(360deg); } }
@keyframes drawPulse { 0%, 100% { transform: scale(1) rotate(-6deg); } 50% { transform: scale(1.25) rotate(6deg); } }
@keyframes drawPop { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes drawFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drawFlash { 0% { opacity: 1; filter: brightness(3); } 100% { opacity: 1; filter: brightness(1); } }
@media (prefers-reduced-motion: reduce) { .draw-stage.anim .draw-rays, .draw-stage.anim .draw-orb { animation: none; } }

/* 가진 캐릭터·장비 카드: 이미지는 효과 없이 카드 폭에 꽉 차게, 설정 중/장착 중 표시는 이미지 위에 겹쳐 보인다 */
.owned-card .img-wrap { position: relative; display: block; width: 100%; }
.owned-card .slot-img, .owned-card .slot-img.big { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 0; background: none; box-shadow: none; filter: none; }
.owned-card .img-wrap .active-badge { position: absolute; top: 8px; left: 50%; right: auto; transform: translateX(-50%); margin: 0; z-index: 2; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .7); }
.owned-card { padding-top: 10px; }
.admin .owned-board .stage-title { color: #ffe9a8; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }

/* 프로필의 캐릭터·무기·방어구 이미지도 효과 없이 칸 폭에 꽉 차게 */
.hero-slot .slot-img, .hero-slot .slot-img.big { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 0; background: none; box-shadow: none; filter: none; }

.target-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #e3efff; color: var(--blue-700); font-weight: 800; font-size: 13px; }

/* 세트효과관리: 세트 아이템 고르기 */
.item-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.item-picker .fancy-select { flex: 1 1 240px; width: auto; max-width: 360px; }
.set-items { display: grid; gap: 8px; margin-top: 6px; }
.set-item-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbff; }
.set-item-row.missing { background: #fff1f0; border-color: #f5b5ae; }
.set-item-img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.set-item-name { flex: 1; font-weight: 800; color: var(--blue-900); }
.set-circle.set-applied { padding: 0; overflow: hidden; }
.set-circle.set-applied img { width: 100%; height: 100%; object-fit: contain; }
.p-name.none { font-size: 13px; font-weight: 700; color: #cfe6ff; }

/* 성장석·각성석·강화석 사용 버튼 줄 */
.use-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; position: relative; }
.use-bar form { margin: 0; }
.use-item-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 190px; padding: 12px 22px; border-radius: 16px; cursor: pointer; font: inherit; color: #fff;
    background: linear-gradient(135deg, #3b86ff, #1546b8); border: 2px solid #ffe08a; box-shadow: 0 0 16px rgba(127, 196, 255, .55), inset 0 0 12px rgba(255, 255, 255, .22);
    transition: transform .15s, box-shadow .15s; }
.use-item-btn strong { font-size: 17px; text-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.use-item-btn:hover { transform: translateY(-3px); box-shadow: 0 0 22px rgba(255, 224, 138, .8), inset 0 0 14px rgba(255, 255, 255, .3); }
.use-item-btn:active { transform: translateY(0); }
.use-meta { display: flex; gap: 10px; font-size: 12px; font-weight: 700; color: #e8f1ff; }
.use-chance { color: #ffe9a8; }

/* 알럿 버튼: 확인(저장·찾기)과 취소를 같은 크기로(한 줄을 반씩 나눠 쓴다) */
.alert-dialog .form-actions { gap: 10px; align-items: stretch; }
.alert-dialog .form-actions > .btn-primary,
.alert-dialog .form-actions > .btn-ghost,
.alert-dialog .form-actions > a.btn-primary {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-height: 46px; padding: 0 18px; margin: 0; border-radius: 12px; font-size: 15px; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; }
.alert-dialog .form-actions > .btn-primary { border: 2px solid var(--blue-700); }
.alert-dialog .form-actions > .btn-ghost { border: 2px solid var(--blue-500); }
.draw-result .btn-primary { min-width: 160px; min-height: 46px; border-radius: 12px; font-size: 15px; border: 2px solid var(--blue-700); }

/* 상단 프로필: 이미지 + 닉네임 (마우스를 올리면 드롭다운) */
.account a.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.account a.me .me-name { text-decoration: underline; text-underline-offset: 3px; }
.me-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; font-weight: 800; font-size: 15px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue-500); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .me-drop { right: auto; left: 0; } }

/* 판 대문 이미지(1050x350 비율) */
.board-banner { margin: 0 0 14px; border-radius: 14px; overflow: hidden; aspect-ratio: 1050 / 350; background: #dcecfd; box-shadow: 0 2px 10px rgba(11, 47, 115, .18); }
.board-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-preview { width: 100%; max-width: 640px; margin: 10px 0; border-radius: 12px; overflow: hidden; background: #eef4ff; border: 1px dashed #b9cde3; display: flex; align-items: center; justify-content: center; color: #6c7d93; font-size: 13px; text-align: center; }
.banner-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* 판 화면 제목줄: 왼쪽 판 이름, 오른쪽 레벨 + 경험치 막대 */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.board-head h2 { margin: 0; }
.board-level { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lv-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #ffd45e, #e3a008); color: #5a3d00; font-weight: 800; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.exp-bar { position: relative; width: 190px; height: 22px; border-radius: 999px; background: #dcecfd; overflow: hidden; box-shadow: inset 0 1px 4px rgba(11, 47, 115, .25); }
.exp-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #3b86ff, #1fc8a0); min-width: 4px; transition: width .4s; }
.exp-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #0b2f73; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }

/* 콘솔: 레벨별 필요 경험치 */
.level-rows { display: grid; gap: 8px; max-width: 420px; margin-bottom: 8px; }
.level-row { display: flex; align-items: center; gap: 10px; }
.level-label { width: 110px; font-weight: 800; color: var(--blue-900); }
.level-row input { flex: 1; padding: 9px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; min-width: 0; }
.level-unit { font-weight: 800; color: #7a5200; }
.level-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.level-form { margin-bottom: 10px; }

/* 푸터: 화면 맨 아래 */
body { display: flex; flex-direction: column; min-height: 100vh; }
.wrap { flex: 1 0 auto; min-height: 0; }
.site-footer { flex-shrink: 0; margin-top: 28px; padding: 18px 16px; background: #0d2a5c; color: #c9d8f0; font-size: 13px; text-align: center; }
.site-footer .footer-inner { max-width: 1050px; margin: 0 auto; }
.site-footer p { margin: 4px 0; }
.site-footer strong { color: #fff; margin-right: 6px; }
.site-footer a { text-decoration: underline; }
.site-footer .footer-copy { margin-top: 10px; color: #8fa8d1; font-size: 12px; }
.footer-form label { display: block; margin: 8px 0; }
.footer-form label span { display: block; font-weight: 700; margin-bottom: 4px; }
.footer-form input { width: 100%; max-width: 560px; }

/* 판 설정(판 회장) */
.board-tools { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.board-tabs a { padding: 5px 14px; border-radius: 999px; background: #eaf2fd; color: #25507f; font-size: 13px; font-weight: 700; }
.board-tabs a.active { background: var(--blue-500); color: #fff; }
.manage-page { max-width: 760px; }
.manage-page .card { margin-bottom: 16px; }
.manage-page .back-link { font-size: 13px; font-weight: 400; margin-left: 10px; color: var(--blue-500); }
.status-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tab-row { display: flex; gap: 6px; }
.tab-row input { flex: 1; max-width: 260px; }
.manager-list { list-style: none; margin: 0 0 12px; padding: 0; }
.manager-list li { display: flex; align-items: center; justify-content: space-between; max-width: 360px; padding: 6px 0; border-bottom: 1px solid #e5edf7; }

/* 판 설정: 모든 버튼을 같은 높이·모양으로 맞춘다 */
.manage-page .btn-primary, .manage-page .btn-ghost, .manage-page .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 40px; padding: 0 18px;
  border-radius: 10px; font: inherit; font-size: 14px; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .05s; }
.manage-page .btn-primary { border: 2px solid var(--blue-700); box-shadow: none; }
.manage-page .btn-ghost { border: 2px solid var(--blue-500); background: #fff; color: var(--blue-700); }
.manage-page .btn-ghost:hover:not(:disabled) { background: var(--blue-500); color: #fff; }
.manage-page .btn-danger { border: 2px solid #e5484d; background: #fff; color: #d6336c; }
.manage-page .btn-danger:hover:not(:disabled) { background: #e5484d; border-color: #e5484d; color: #fff; }
.manage-page button:active:not(:disabled) { transform: translateY(1px); }
.manage-page button:disabled { cursor: default; opacity: .55; }
.manage-page .btn-primary:disabled { background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); opacity: .55; }
.manage-page .banner-form, .manage-page .inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.manage-page .banner-form input[type=file] { height: 40px; padding: 7px 0; }
.manage-page .inline-form label { display: flex; align-items: center; gap: 8px; margin: 0; }
.manage-page .inline-form input[type=text], .manage-page .tab-row input { height: 40px; padding: 0 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; }
.manage-page .tab-row { align-items: center; }
.manage-page .tab-row .btn-ghost, .manage-page .tab-row .btn-danger { min-width: 72px; }
.manage-page .form-actions { display: flex; gap: 8px; margin-top: 10px; }
.manage-page .status-buttons { gap: 10px; }
.manage-page .status-buttons form { margin: 0; }
.manage-page .manager-list li form { margin: 0; }
.manage-page .manager-list li .btn-danger { min-width: 72px; height: 34px; font-size: 13px; }

/* 판 게시판: 인기글 표시·페이징·하단 버튼·에디터 */
.hot-mark { margin-right: 4px; }
.pager { display: flex; justify-content: center; gap: 4px; margin: 16px 0; flex-wrap: wrap; }
.pager a { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid #c9d8ea; font-weight: 700; font-size: 13px; color: var(--blue-700); }
.pager a:hover { background: #eaf2fd; }
.pager a.active { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.board-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.board-actions .left, .board-actions .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.board-actions form { margin: 0; }
.board-actions .btn-primary, .board-actions .btn-ghost, .board-actions .btn-danger,
.write-actions .btn-primary, .write-actions .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 40px; padding: 0 18px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; text-decoration: none; }
.board-actions .btn-primary, .write-actions .btn-primary { border: 2px solid var(--blue-700); box-shadow: none; color: #fff; }
.board-actions .btn-ghost, .write-actions .btn-ghost { border: 2px solid var(--blue-500); background: #fff; color: var(--blue-700); }
.board-actions .btn-ghost:disabled { opacity: .55; cursor: default; }
.board-actions .btn-danger { border: 2px solid #e5484d; background: #fff; color: #d6336c; }
.board-actions .btn-danger:hover { background: #e5484d; color: #fff; }
.write-form { display: grid; gap: 12px; }
.write-row { display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: var(--blue-900); }
.write-row input, .write-row select { height: 40px; padding: 0 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; max-width: 100%; }
.editor { border: 1px solid #b9cde3; border-radius: 12px; overflow: hidden; background: #fff; }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #eef4ff; border-bottom: 1px solid #d5e2f2; }
.editor-bar button { min-width: 34px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #c3d5ea; background: #fff; cursor: pointer; font: inherit; font-size: 13px; color: var(--blue-900); }
.editor-bar button:hover { background: var(--blue-500); color: #fff; }
.editor-bar .sep { width: 1px; background: #c3d5ea; margin: 0 4px; }
.editor-area { min-height: 320px; padding: 14px; outline: none; line-height: 1.7; }
.write-actions { display: flex; gap: 8px; }
.sub-title { font-size: 14px; font-weight: 400; color: #6c7d93; }
.post-view { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.post-view h3 { margin: 8px 0; font-size: 20px; color: var(--blue-900); }
.post-meta { color: #6c7d93; font-size: 13px; margin: 0 0 14px; }
.post-body { line-height: 1.8; word-break: break-word; border-top: 1px solid #e5edf7; padding-top: 14px; }
.post-body blockquote { margin: 8px 0; padding: 6px 14px; border-left: 4px solid var(--blue-500); background: #f2f7ff; }

/* 사람 목록(가입자·가입신청·관리자 보기) */
.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person-list li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e0eaf6; border-radius: 12px; background: #fff; }
.person-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-400), var(--blue-700)); color: #fff; font-weight: 800; border: 2px solid var(--gold); }
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.person-info small { color: #6c7d93; font-size: 12px; }
.person-info .stats { flex-basis: 100%; }
.role-chip { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #dcecfd; color: var(--blue-700); }
.role-chip.bad { background: #fde4e6; color: #d6336c; }
.person-actions { display: flex; gap: 6px; flex: none; }
.person-actions form { margin: 0; }
.manage-page .person-actions .btn-primary, .manage-page .person-actions .btn-ghost, .manage-page .person-actions .btn-danger { min-width: 76px; height: 36px; }
.state-options { display: grid; gap: 8px; margin: 8px 0; }
.state-options label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.state-options input[type=number] { width: 70px; height: 32px; border: 1px solid #b9cde3; border-radius: 8px; padding: 0 8px; }
.admin-side nav a.side-back { margin-top: 8px; color: #6c7d93; }
.admin-side nav a.active { background: var(--blue-500); color: #fff; }
.manage-page .rules-form { display: grid; gap: 12px; }
.manage-page .rules-form label { display: grid; gap: 4px; font-weight: 700; }
.manage-page .rules-form select, .manage-page .tab-row select { height: 40px; border: 1px solid #b9cde3; border-radius: 10px; padding: 0 10px; font: inherit; }
.manage-page .tab-row { flex-wrap: wrap; align-items: flex-end; }
.manage-page .tab-row label { display: grid; gap: 2px; font-size: 11px; color: #6c7d93; font-weight: 700; }
.manage-page { max-width: none; }

/* 왼쪽 패널 방문자 · 글 속 이미지/유튜브 */
.player .visitors { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .14); font-size: 13px; }
.player .visitors strong { font-size: 16px; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; }
.post-body .yt { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 10px 0; }
.post-body .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.editor-area img { max-width: 100%; height: auto; border-radius: 8px; }
.editor-bar .media-tools { display: contents; }
.editor-bar .media-tools[hidden] { display: none; }

/* 글 화면: 튀어나온 카드 대신 옅은 구분선, 추천 버튼 가운데, 글쓴이 메뉴 */
.post-view { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.post-head { box-shadow: none; z-index: auto; position: relative; padding: 16px 4px 14px; border-top: 2px solid rgba(20, 89, 199, .28); border-bottom: 1px solid rgba(20, 89, 199, .18); }
.post-tab { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: var(--blue-700); }
.post-head h3 { margin: 0 0 8px; padding-right: 48px; font-size: 21px; color: var(--blue-900); }
.post-meta { margin: 0; color: #6c7d93; font-size: 13px; }
.post-meta .dot { margin: 0 6px; color: rgba(108, 125, 147, .45); }
.post-body { border-top: 0; padding: 20px 4px; min-height: 120px; border-bottom: 1px solid rgba(20, 89, 199, .12); }
.post-like-row { display: flex; justify-content: center; margin: 22px 0 6px; }
.post-like-row form { margin: 0; }
.post-like-row .btn-primary, .post-like-row .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 42px; padding: 0 22px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 800; }
.post-like-row .btn-primary { border: 2px solid var(--blue-700); box-shadow: none; }
.post-menu { position: absolute; top: 10px; right: 2px; }
.post-menu summary { list-style: none; cursor: pointer; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 22px; line-height: 1; color: #6c7d93; user-select: none; }
.post-menu summary::-webkit-details-marker { display: none; }
.post-menu summary:hover, .post-menu[open] summary { background: rgba(20, 89, 199, .1); color: var(--blue-700); }
.post-menu-drop { position: absolute; right: 0; top: 38px; z-index: 40; min-width: 110px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(11, 47, 115, .22); }
.post-menu-drop a, .post-menu-drop button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 700; text-align: left; color: var(--blue-900); cursor: pointer; text-decoration: none; }
.post-menu-drop a:hover, .post-menu-drop button:hover { background: #dcecfd; }
.post-menu-drop button.danger { color: #d6336c; }
.post-menu-drop button.danger:hover { background: #fde4e6; }
.post-menu-drop form { margin: 0; }

/* 쪽지 · 친구관리 */
.memo-page { max-width: 900px; margin: 0 auto; }
.memo-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.memo-tools .btn-primary { display: inline-flex; align-items: center; justify-content: center; min-width: 110px; height: 40px; padding: 0 18px; border: 2px solid var(--blue-700); border-radius: 10px; box-shadow: none; font: inherit; font-weight: 800; cursor: pointer; }
.memo-list .memo-row { cursor: pointer; }
.memo-list .memo-row:hover td { background: #e8f1fd; }
.memo-list .memo-row.is-unread td { background: #eaf4ff; font-weight: 800; color: var(--blue-900); }
.memo-list .memo-row.is-read td { background: #fff; font-weight: 400; color: #7a8aa0; }
.c-del { width: 74px; text-align: center; }
.c-del form { margin: 0; }
.memo-list button.memo-del { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; opacity: .65; }
.memo-list button.memo-del:hover { background: #fde8ef; opacity: 1; }
.memo-dot { color: var(--blue-500); font-size: 10px; vertical-align: middle; }
.memo-legend { margin: 8px 2px; font-size: 12px; color: #6c7d93; }
.memo-dialog { width: min(520px, calc(100vw - 32px)); }
.memo-meta { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: #f2f7ff; font-size: 14px; }
.memo-meta dt { color: #6c7d93; font-weight: 700; }
.memo-meta dd { margin: 0; word-break: break-word; font-weight: 700; color: var(--blue-900); }
.memo-content { white-space: pre-wrap; word-break: break-word; min-height: 100px; max-height: 280px; overflow: auto; padding: 12px; border: 1px solid #dbe6f4; border-radius: 10px; line-height: 1.7; font-size: 14px; }
.memo-field { display: grid; gap: 4px; margin: 8px 0; font-weight: 700; font-size: 14px; color: var(--blue-900); }
.memo-field input, .memo-field textarea { padding: 9px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; resize: vertical; }
.memo-field input[readonly] { background: #f2f5fa; }
.memo-dialog .form-actions > button { min-width: 0; flex: 1; height: 42px; border-radius: 10px; font: inherit; font-weight: 800; cursor: pointer; }
.memo-dialog .btn-danger { border: 2px solid #e5484d; background: #fff; color: #d6336c; }
.memo-dialog .btn-danger:hover { background: #e5484d; color: #fff; }
.menu-badge { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; vertical-align: middle; }
.account .me-drop a { display: flex; align-items: center; justify-content: space-between; }
.manage-page .person-actions a.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 36px; padding: 0 14px; border: 2px solid var(--blue-500); border-radius: 10px; background: #fff; color: var(--blue-700); font-weight: 800; font-size: 14px; text-decoration: none; }
.manage-page .person-actions a.btn-ghost:hover { background: var(--blue-500); color: #fff; }
.admin-side nav a { display: flex; align-items: center; justify-content: space-between; }

/* 좋아요 / 싫어요 */
.post-like-row { align-items: center; gap: 14px; }
.post-like-row form { margin: 0; }
.post-score { min-width: 44px; text-align: center; font-size: 22px; font-weight: 800; color: var(--blue-900); }
.react-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 42px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; background: #fff; transition: background .15s, color .15s; }
.react-btn.like { border: 2px solid var(--blue-500); color: var(--blue-700); }
.react-btn.like:hover:not(:disabled), .react-btn.like.on { background: var(--blue-500); color: #fff; }
.react-btn.dislike { border: 2px solid #e5484d; color: #d6336c; }
.react-btn.dislike:hover:not(:disabled), .react-btn.dislike.on { background: #e5484d; color: #fff; }
.react-btn:disabled { opacity: .5; cursor: default; }

/* 내 아이템 삭제 버튼 */
.owned-item { position: relative; display: flex; flex-direction: column; gap: 6px; }
.owned-item > form:first-child { flex: 1; }
.owned-del-form { margin: 0; }
.owned-del { width: 100%; height: 34px; border: 2px solid #e5484d; border-radius: 10px; background: rgba(255, 255, 255, .92); color: #d6336c; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.owned-del:hover:not(:disabled) { background: #e5484d; color: #fff; }
.owned-del:disabled { opacity: .4; cursor: not-allowed; }

/* 글쓰기: 급성장·인기글 노출 체크박스 */
.write-opts { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border: 1px solid #dbe6f4; border-radius: 10px; background: #f6faff; }
.write-opts[hidden] { display: none; }
.opt-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--blue-900); cursor: pointer; }
.opt-check input { width: 18px; height: 18px; }

/* 폼 제출 뒤 스크롤을 유지할 때: 결과 알림을 화면 위에 잠깐 띄운다 */
.notice.floating { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; max-width: min(560px, 92vw); margin: 0; box-shadow: 0 8px 24px rgba(11, 47, 115, .28); transition: opacity .6s; }
.notice.floating.fading { opacity: 0; }

/* 내 아이템 삭제: 평소에는 숨기고, 카드에 마우스를 올리면 오른쪽 아래에 아이콘으로 보인다 */
.owned-item { gap: 0; }
.owned-del-form { position: absolute; right: 6px; bottom: -12px; z-index: 5; margin: 0; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; }
.owned-item:hover .owned-del-form, .owned-del-form:focus-within { opacity: 1; transform: none; pointer-events: auto; }
.owned-del { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 30, 50, .78); color: #fff; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.owned-del:hover:not(:disabled) { background: #e5484d; color: #fff; }
.owned-del:disabled { opacity: .45; }
@media (hover: none) { .owned-del-form { opacity: .9; transform: none; pointer-events: auto; } }

/* 랭킹 */
.reward-period { display: inline-block; min-width: 50px; font-weight: 800; color: var(--blue-700); }
.reward-rank { display: inline-block; min-width: 34px; font-weight: 800; }
.power-box strong { color: #d97706; }
.dl-power, .player .stats dd.power { color: #ffd66b; font-weight: 800; }

/* 콘솔: 랭킹설정 */
.ranking-form .card { margin-bottom: 16px; }
.rank-cat { margin: 14px 0 6px; padding-top: 10px; border-top: 1px dashed #d5e2f2; }
.rank-cat h4 { margin: 0 0 8px; font-size: 15px; color: var(--blue-900); }
.rank-slot { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #e0eaf6; border-radius: 10px; background: #fafcff; }
.rank-slot-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rank-slot-no { min-width: 40px; color: var(--blue-700); }
.rank-points { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.reward-items { display: grid; gap: 6px; margin-top: 8px; }
.reward-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reward-item select { min-width: 180px; height: 36px; border: 1px solid #b9cde3; border-radius: 8px; padding: 0 8px; font: inherit; }
.reward-item input[type=number] { width: 90px; height: 36px; border: 1px solid #b9cde3; border-radius: 8px; padding: 0 8px; font: inherit; }
.ranking-form .btn-ghost, .ranking-form .btn-danger, .pay-buttons .btn-ghost { height: 36px; padding: 0 14px; border-radius: 10px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.ranking-form .btn-danger { border: 2px solid #e5484d; background: #fff; color: #d6336c; }
.ranking-form .btn-danger:hover { background: #e5484d; color: #fff; }
.pay-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-buttons form { margin: 0; }

/* ===== 랭킹: 별빛 무대 + 금테 + 시상대(내 정보의 캐릭터·아이템 화면과 같은 분위기) ===== */
.ranking-page { max-width: 980px; }
.rank-stage { position: relative; overflow: hidden; padding: 26px 22px 22px; border-radius: 20px; border: 2px solid #e3b341; color: #fff;
    background: radial-gradient(ellipse at 50% 0%, #2f6fd6 0%, #123a8c 38%, #0a1f5c 100%);
    box-shadow: 0 8px 28px rgba(10, 31, 92, .45), inset 0 0 0 3px rgba(255, 224, 130, .35), inset 0 0 60px rgba(90, 170, 255, .25); }
.rank-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
    background-image: radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 78% 12%, #cfe6ff, transparent),
        radial-gradient(2px 2px at 30% 60%, #ffe9a8, transparent), radial-gradient(1.5px 1.5px at 88% 52%, #fff, transparent),
        radial-gradient(2px 2px at 55% 84%, #cfe6ff, transparent), radial-gradient(1.5px 1.5px at 6% 86%, #ffe9a8, transparent),
        radial-gradient(1.5px 1.5px at 66% 36%, #fff, transparent), radial-gradient(2px 2px at 93% 90%, #ffe9a8, transparent);
    animation: rankTwinkle 4s ease-in-out infinite alternate; }
.rank-stage > * { position: relative; }
.rank-head { text-align: center; margin-bottom: 6px; }
.rank-head h2 { display: block; margin: 0 0 4px; font-size: 28px; letter-spacing: 2px; color: #ffe9a8; text-shadow: 0 2px 10px rgba(255, 190, 40, .75), 0 0 24px rgba(255, 214, 102, .55); }
.rank-head h2::before { display: none; }
.rank-head p { margin: 0; font-size: 13px; color: #cfe0ff; }
.rank-me { margin: 14px auto 0; width: fit-content; padding: 8px 22px; border-radius: 999px; font-weight: 800; color: #5a3d00; background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); box-shadow: 0 3px 0 #b88200, 0 0 18px rgba(255, 214, 102, .6); }
.rank-alert { margin: 18px auto 6px; width: fit-content; max-width: 100%; padding: 12px 20px; border-radius: 14px; text-align: center; font-weight: 700; color: #ffe9a8; background: rgba(8, 24, 72, .55); border: 1px solid rgba(255, 224, 130, .45); }
.rank-board-name { margin: 16px 0 0; text-align: center; font-size: 18px; }
.rank-board-name a { color: #fff; text-shadow: 0 0 12px rgba(127, 196, 255, .9); }

/* 시상대 */
.rk-podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 30px 0 22px; }
.pod { position: relative; flex: 1 1 0; max-width: 250px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 0; text-align: center;
    border-radius: 18px 18px 0 0; border: 2px solid var(--pod, #7fc4ff); border-bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, .06) 55%, rgba(8, 24, 72, .35));
    box-shadow: 0 0 22px var(--pod-glow, rgba(127, 196, 255, .55)), inset 0 0 24px rgba(255, 255, 255, .12); transition: transform .2s, filter .2s; }
.pod:hover { transform: translateY(-6px); filter: brightness(1.08); }
.pod.p1 { --pod: #ffd24d; --pod-glow: rgba(255, 210, 77, .85); padding-top: 26px; animation: rankGlow 2.6s ease-in-out infinite; }
.pod.p2 { --pod: #dfe6ee; --pod-glow: rgba(223, 230, 238, .65); }
.pod.p3 { --pod: #e0975a; --pod-glow: rgba(224, 151, 90, .7); }
.pod.mine { outline: 3px dashed #7fffd4; outline-offset: 3px; }
.crown { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 34px; filter: drop-shadow(0 0 10px rgba(255, 214, 102, .95)); animation: rankBob 2s ease-in-out infinite; }
.pod-medal { font-size: 34px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); }
.pod.p1 .pod-medal { font-size: 42px; }
.pod-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--blue-400), var(--blue-700)); border: 4px solid var(--pod, #7fc4ff); box-shadow: 0 0 18px var(--pod-glow, rgba(127, 196, 255, .6)); }
.pod.p1 .pod-avatar { width: 96px; height: 96px; font-size: 38px; }
.pod-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
a.pod-name:hover { color: #ffe9a8; text-decoration: underline; }
.pod-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #d6e6ff; }
.pod-main { display: grid; gap: 0; margin-top: 4px; }
.pod-main small { font-size: 11px; letter-spacing: 1px; color: #bcd9ff; }
.pod-main b { font-size: 30px; line-height: 1.15; font-weight: 900; background: linear-gradient(180deg, #fff6c7, #ffc61a 60%, #e6a800); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)); }
.pod.p1 .pod-main b { font-size: 38px; }
.pod-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 11px; }
.pod-stats span { padding: 2px 9px; border-radius: 999px; background: rgba(8, 24, 72, .55); border: 1px solid rgba(255, 255, 255, .22); }
.pod-stats i { font-style: normal; color: #bcd9ff; }
.pod-stats b { color: #fff; }
.pod-base { width: calc(100% + 4px); margin: 8px -2px 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: #5a3d00;
    background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); border-radius: 0; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); }
.pod.p1 .pod-base { height: 70px; font-size: 38px; }
.pod.p2 .pod-base { height: 50px; background: linear-gradient(180deg, #f6f9fc, #aeb8c3); color: #3d464d; }
.pod.p3 .pod-base { height: 36px; background: linear-gradient(180deg, #f3c9a0, #b9733a); color: #4d2a0a; }

/* 4등 이하 */
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 44px 46px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 14px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); transition: transform .15s, border-color .15s; }
.rank-row:hover { transform: translateX(4px); border-color: #ffe08a; }
.rank-row.mine { border-color: #7fffd4; box-shadow: 0 0 16px rgba(127, 255, 212, .55); }
.rank-no { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 900; color: #5a3d00;
    background: linear-gradient(135deg, #ffe27a, var(--gold-dark)); box-shadow: 0 0 10px rgba(255, 214, 102, .55); }
.rank-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--blue-400), var(--blue-700)); border: 2px solid var(--gold); }
.rank-av img { width: 100%; height: 100%; object-fit: cover; }
.rank-who { display: grid; min-width: 0; line-height: 1.3; }
.rank-who a, .rank-who strong { color: #fff; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-who a:hover { color: #ffe9a8; text-decoration: underline; }
.rank-who small { color: #bcd9ff; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-stats { display: flex; gap: 8px; font-size: 12px; }
.rank-stats span { padding: 2px 9px; border-radius: 999px; background: rgba(8, 24, 72, .5); border: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; }
.rank-stats i { font-style: normal; color: #bcd9ff; }
.rank-main { display: grid; min-width: 78px; text-align: right; line-height: 1.1; }
.rank-main small { font-size: 10px; letter-spacing: 1px; color: #bcd9ff; }
.rank-main b { font-size: 20px; font-weight: 900; color: #ffd24d; text-shadow: 0 0 10px rgba(255, 190, 40, .55); }
.rank-formula { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: #bcd9ff; text-align: center; }
.rank-reward { margin: 16px auto 0; max-width: 560px; padding: 12px 18px; border-radius: 14px; font-size: 13px; background: rgba(255, 224, 130, .12); border: 1px solid rgba(255, 224, 130, .55); box-shadow: inset 0 0 18px rgba(255, 214, 102, .15); }
.rank-reward > strong { color: #ffe9a8; font-size: 14px; }
.rank-reward ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rank-reward .reward-period { color: #ffd24d; }
.rank-reward .reward-rank { color: #fff; }

@keyframes rankTwinkle { from { opacity: .35; } to { opacity: .8; } }
@keyframes rankGlow { 0%, 100% { box-shadow: 0 0 22px rgba(255, 210, 77, .7), inset 0 0 24px rgba(255, 255, 255, .12); } 50% { box-shadow: 0 0 44px 6px rgba(255, 210, 77, .95), inset 0 0 30px rgba(255, 240, 180, .3); } }
@keyframes rankBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .rank-stage::before, .pod.p1, .crown { animation: none; } }
@media (max-width: 720px) {
    .rk-podium { gap: 8px; }
    .pod { padding-left: 6px; padding-right: 6px; }
    .pod-avatar { width: 54px; height: 54px; font-size: 22px; }
    .pod.p1 .pod-avatar { width: 68px; height: 68px; }
    .pod-main b { font-size: 22px; } .pod.p1 .pod-main b { font-size: 28px; }
    .pod-stats { display: none; }
    .rank-row { grid-template-columns: 36px 40px minmax(0, 1fr) auto; }
    .rank-stats { display: none; }
}

/* 랭킹 제목 이미지 + 주간/월간 선택 */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.rank-stage .sr-only::before { display: none; }
.rank-banner { margin: -4px -6px 14px; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 224, 130, .75); box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 214, 102, .35); aspect-ratio: 1050 / 350; background: #0a1f5c; }
.rank-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rank-period { display: flex; justify-content: center; gap: 8px; margin: 0 0 6px; }
.rank-period a { min-width: 96px; padding: 8px 20px; border-radius: 999px; text-align: center; font-weight: 800; font-size: 14px; color: #ffe9a8; background: rgba(8, 24, 72, .6); border: 1px solid rgba(255, 224, 130, .5); transition: transform .15s, background .15s; }
.rank-period a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .15); }
.rank-period a.on { color: #5a3d00; background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); border-color: var(--gold-dark); box-shadow: 0 3px 0 #b88200, 0 0 16px rgba(255, 214, 102, .6); }

/* 랭킹 참여 자격 안내(무대 위) */
.rank-rule { margin: 12px 0 0; text-align: center; font-size: 13px; color: #cfe0ff; }
.rank-progress { margin: 8px auto 0; width: fit-content; max-width: 100%; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(8, 24, 72, .6); border: 1px solid rgba(255, 255, 255, .3); }
.rank-progress strong { padding: 2px 12px; border-radius: 999px; font-size: 12px; }
.rank-progress.ok strong { color: #0b3d2e; background: linear-gradient(180deg, #9dffd8, #3ed6a4); }
.rank-progress.no strong { color: #fff; background: #d6336c; }

/* 콘솔: 랭킹 참여 자격 */
.elig-form { display: grid; gap: 12px; }
.elig-form label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; }
.elig-form input[type=number] { height: 38px; width: 140px; padding: 0 10px; border: 1px solid #b9cde3; border-radius: 8px; font: inherit; }
.elig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.elig-grid fieldset { margin: 0; padding: 12px 14px; display: grid; gap: 10px; border: 1px solid #d5e2f2; border-radius: 12px; background: #fafcff; }
.elig-grid legend { padding: 0 8px; font-weight: 800; color: var(--blue-700); }

/* ===== 댓글 · 대댓글 · BEST ===== */
.cmt-count { margin-left: 6px; font-style: normal; font-size: 12px; font-weight: 800; color: #e8453c; }
.comments { margin: 26px 0 8px; }
.comments-title { margin: 0 0 12px; font-size: 18px; color: var(--blue-900); }
.comments-title em { font-style: normal; color: var(--blue-500); margin-left: 4px; }
.best-box { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 2px solid #f2c94c; background: linear-gradient(180deg, #fffbe9, #fff4c9); box-shadow: 0 2px 10px rgba(230, 168, 0, .2); }
.best-box h4 { margin: 0 0 8px; font-size: 14px; color: #8a5a00; letter-spacing: 1px; }
.best-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.best-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 4px; border-top: 1px dashed rgba(138, 90, 0, .25); }
.best-list li:first-child { border-top: 0; }
.best-rank { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; font-weight: 900; color: #5a3d00; background: linear-gradient(135deg, #ffe27a, var(--gold-dark)); }
.best-body { min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.best-author { font-weight: 800; color: var(--blue-900); white-space: nowrap; }
.best-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3a4a60; font-size: 14px; }
.best-score { font-size: 13px; white-space: nowrap; color: #7a5a1a; }
.best-score i { font-style: normal; margin-left: 6px; opacity: .8; }
.cm-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0 0 14px; align-items: stretch; }
.cm-form textarea { padding: 10px 12px; border: 1px solid #b9cde3; border-radius: 10px; font: inherit; resize: vertical; min-height: 64px; }
.cm-form .btn-primary { align-self: stretch; min-width: 96px; border: 2px solid var(--blue-700); border-radius: 10px; font: inherit; font-weight: 800; cursor: pointer; box-shadow: none; }
.cm-form[hidden] { display: none; }
.cm-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #f2f7ff; color: #4a5a70; font-size: 13px; }
.cm-note a { color: var(--blue-700); font-weight: 800; text-decoration: underline; }
.comment-list, .reply-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 12px 4px; border-bottom: 1px solid rgba(20, 89, 199, .14); }
.comment:target { background: #fffbe0; }
.cm-head { display: flex; align-items: baseline; gap: 8px; }
.cm-author { font-size: 14px; color: var(--blue-900); }
.cm-mine { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--blue-500); }
.cm-date { font-size: 12px; color: #7a8aa0; }
.cm-body { margin: 6px 0 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.65; font-size: 14px; }
.cm-body.gone { color: #9aa7b8; font-style: italic; }
.cm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.cm-actions form { margin: 0; }
.c-react { min-width: 56px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid #c3d5ea; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: #4a5a70; }
.c-react.like:hover, .c-react.like.on { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.c-react.dislike:hover, .c-react.dislike.on { background: #e5484d; border-color: #e5484d; color: #fff; }
.c-react-static { font-size: 12px; color: #6c7d93; }
.c-link { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; color: var(--blue-700); }
.c-link:hover { background: #dcecfd; }
.c-link.danger { color: #d6336c; }
.c-link.danger:hover { background: #fde4e6; }
.reply-wrap { padding: 0 0 0 26px; border-bottom: 1px solid rgba(20, 89, 199, .14); background: #f6f9ff; }
.reply-list .comment { border-bottom: 1px dashed rgba(20, 89, 199, .14); position: relative; }
.reply-list .comment:last-child { border-bottom: 0; }
.reply-list .comment::before { content: "↳"; position: absolute; left: -18px; top: 12px; color: #9fb3cf; }
.reply-form { margin: 8px 0 0; }
.player a.enhance { text-align: center; text-decoration: none; box-sizing: border-box; }

/* 판 즐겨찾기 별(레벨 왼쪽) */
.board-level { align-items: center; }
.board-fav { margin: 0; display: inline-flex; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--gold); background: #fff; color: #c99700; font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.fav-btn:hover { transform: scale(1.12); background: #fff6cf; }
.fav-btn.on { background: linear-gradient(180deg, #ffe27a, var(--gold-dark)); color: #5a3d00; box-shadow: 0 0 12px rgba(255, 190, 40, .75); }

/* 닉네임 드롭다운 메뉴 */
.nick-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: none; }
.nick-btn:hover { color: var(--blue-700); text-decoration: underline; }
.nick-menu { position: absolute; z-index: 60; min-width: 130px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(11, 47, 115, .22); }
.nick-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 700; text-align: left; color: var(--blue-900); cursor: pointer; }
.nick-menu button:hover { background: #dcecfd; }
.user-card { text-align: center; }
.person-avatar.lg { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 8px; }
.uc-name { font-size: 18px; font-weight: 800; }
.uc-char { color: #6c7d93; margin: 2px 0 10px; }
.uc-stats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.uc-stats .pw { font-weight: 800; color: var(--blue-700); }
/* 블라인드 글 */
tr.is-blind td, tr.is-blind td a { color: #9aa3ae; }
tr.is-blind { background: #f1f3f5; }
.blind-tag { display: inline-block; margin-right: 4px; font-size: 12px; font-weight: 800; color: #6c7d93; }
.blind-box { margin: 10px 0 14px; padding: 14px 16px; border-radius: 12px; background: #f1f3f5; border: 1px solid #d5dae0; color: #4a5562; }
.blind-box p { margin: 6px 0 0; }
.blind-box b { color: #d6336c; }
#blindDialog textarea { width: 100%; box-sizing: border-box; margin-top: 6px; }

/* 닉네임 메뉴 알럿: 회원정보는 프로필처럼 넓게, 남의 정보라 칸을 눌러도 이동하지 않는다 */
.alert-dialog.nick-dialog.wide { width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; }
.nick-dialog .slot-stretch { display: none; }
.nick-dialog .user-card { text-align: left; }
.nick-dialog .user-card .card:first-child { margin-top: 0; }
.nick-dialog .memo-field { display: block; margin-bottom: 10px; }
.nick-dialog .memo-field span { display: block; font-weight: 700; margin-bottom: 4px; }
.nick-dialog .memo-field input, .nick-dialog .memo-field textarea { width: 100%; box-sizing: border-box; }
/* 댓글 오른쪽 위 드롭다운 */
.cm-head { position: relative; }
.cm-menu { position: relative; margin-left: auto; top: 0; right: 0; align-self: center; }
.cm-menu summary { width: 28px; height: 28px; font-size: 18px; }
.cm-menu .post-menu-drop { top: 30px; }
.cm-body.gone.by-staff { color: #d6336c; }
.cm-body.gone.blinded-cm { color: #9aa7b8; }

/* 소속판 랭킹 참가 자격 표시 */
.rank-elig { margin: 8px 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rank-elig.ok { background: #e3f6ea; color: #1b6b3a; }
.rank-elig.no { background: #fff1dc; color: #9a5a00; }

/* 로그아웃 상태 왼쪽 배너 */
.side-banner { display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(11, 47, 115, .28); border: 2px solid #e3b341; }
.side-banner img { display: block; width: 100%; height: auto; }
.side-preview { max-width: 240px; }

/* 콘솔 아이템 지급: 대상 선택 50:50 */
.grant-target { display: flex; gap: 22px; margin: 6px 0; }
.grant-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.grant-split[hidden] { display: none; }
.grant-pane { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; min-width: 0; }
.grant-pane h4 { margin: 0 0 8px; font-size: 14px; }
.grant-pane h4 em { font-style: normal; color: var(--blue-700); }
.grant-search { display: flex; gap: 6px; }
.grant-search input { flex: 1; min-width: 0; }
.grant-list-box { list-style: none; margin: 8px 0 0; padding: 0; max-height: 320px; overflow: auto; }
.grant-list-box li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid rgba(20, 89, 199, .12); font-size: 13px; }
.grant-list-box li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .grant-split { grid-template-columns: 1fr; } }
/* 로그인 화면 회원가입 버튼 */
.auth-signup { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; }
.auth-signup p { margin: 0 0 8px; font-size: 13px; color: #6c7d93; }
.auth-signup a.btn-signup { display: block; box-sizing: border-box; width: 100%; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--blue-700); background: #fff; color: var(--blue-700); font-weight: 800; font-size: 16px; text-decoration: none; text-align: center; }
.auth-signup a.btn-signup:hover { background: var(--blue-700); color: #fff; }
.auth-sub { text-align: center; margin: 14px 0 0; font-size: 14px; }

/* 아이템 지급 화면: 칸 사이 여백과 버튼 크기 통일 */
#grantForm .card { padding: 20px 22px; margin-top: 20px; }
#grantForm .card h3 { margin-bottom: 16px; }
#grantForm .rank-points { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 14px; }
#grantForm .rank-points .points-input { width: 220px; }
#grantForm .rank-slot-head { justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px dashed var(--line); margin-bottom: 4px; }
#grantForm .reward-items { gap: 10px; margin-top: 12px; }
#grantForm .reward-item { gap: 10px; padding: 8px 10px; border: 1px solid rgba(20, 89, 199, .14); border-radius: 10px; background: #f7faff; flex-wrap: nowrap; }
#grantForm .reward-item select { flex: 1; min-width: 0; }
#grantForm .grant-target { gap: 28px; margin: 4px 0 8px; }
#grantForm .grant-split { gap: 20px; margin-top: 16px; }
#grantForm .grant-pane { padding: 16px; }
#grantForm .grant-pane h4 { margin-bottom: 12px; }
#grantForm .grant-list-box { margin-top: 12px; }
#grantForm .grant-list-box li { padding: 8px 4px; }
/* 이 화면의 모든 버튼(추가·삭제·검색·지급)을 같은 높이·최소 너비로 */
#grantForm button.btn-ghost, #grantForm button.btn-primary, #grantForm button.btn-danger {
    box-sizing: border-box; height: 38px; min-width: 72px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
#grantForm button.btn-danger { border: 2px solid #d6336c; background: #fff; color: #d6336c; }
#grantForm button.btn-danger:hover { background: #d6336c; color: #fff; }
#grantForm button.btn-primary { border: 2px solid var(--blue-700); }
#grantForm .grant-list-box li button { height: 32px; min-width: 64px; font-size: 13px; }
#grantForm .form-actions { margin-top: 20px; justify-content: flex-end; }
#grantForm .form-actions .btn-primary { min-width: 120px; height: 44px; font-size: 15px; }

.logo-preview { max-width: 360px; background: #fff; padding: 8px; }
.logo-preview img { object-fit: contain; }
@media (max-width: 700px) {
    .top { padding: 6px 10px; }
    .logo img { height: 44px; }
    .side { display: none; }   /* 모바일: 왼쪽 배너(로그아웃)와 캐릭터·프로필 창(로그인)은 숨긴다 */
    .account a, .logout button { padding: 2px 8px; font-size: 11px; border-width: 1.5px; }
    .account a.me { padding: 0; }
    .me-name { display: none; }
}
.size-badge { display: inline-block; margin: 0 0 8px; padding: 5px 12px; border-radius: 999px; background: #fff4d6; border: 1px solid #e3b341; color: #7a5200; font-size: 13px; font-weight: 700; }

/* 상점 */
.shop-points { margin: 0 0 12px; font-size: 15px; }
.shop-points strong { color: var(--blue-700); }
.price-chip { background: #fff4d6; color: #7a5200; }
.buy-form { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.buy-form input[type=number] { width: 64px; padding: 6px; text-align: center; border: 2px solid #c9d8ee; border-radius: 8px; font: inherit; }
.buy-form button { min-width: 72px; }
.soon-text { font-size: 18px; font-weight: 800; color: var(--blue-700); }
.shop-sect { margin: 22px 0 10px; font-size: 17px; color: var(--blue-900); }
