@charset "UTF-8";
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin-block-end: 0;
}

ul[role=list], ol[role=list] {
  list-style: none;
}

body {
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, button, input, label {
  line-height: 1.1;
}

h1, h2, h3, h4 {
  text-wrap: balance;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

img, picture {
  max-width: 100%;
  display: block;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

textarea:not([rows]) {
  min-height: 10em;
}

:target {
  scroll-margin-block: 5ex;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: #F8FAFC;
  color: var(--text);
}

a {
  text-decoration: none;
  color: inherit;
}

@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
/* ═══════════════════════════════════════
   헤더
═══════════════════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--sky-dark);
  letter-spacing: -0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  background: var(--sky-dark);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-login:hover {
  background: var(--sky-deep);
}

/* ═══════════════════════════════════════
   레이아웃
═══════════════════════════════════════ */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* ═══════════════════════════════════════
   푸터
═══════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px;
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 40px;
  background: var(--white);
}

.footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover {
  color: var(--sky-dark);
}

/* ═══════════════════════════════════════
   기본 설정
═══════════════════════════════════════ */
:root {
  --sky: #38BDF8;
  --sky-dark: #0EA5E9;
  --sky-deep: #0284C7;
  --sky-light: #E0F2FE;
  --sky-pale: #F0F9FF;
  --text: #1E293B;
  --text-sub: #64748B;
  --text-mute: #94A3B8;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(14,165,233,0.15);
  --radius: 12px;
}

/* ═══════════════════════════════════════
   사이드바
═══════════════════════════════════════ */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 24px 0;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
  font-weight: 500;
}

.sidebar-item:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.sidebar-item.active {
  background: var(--sky-light);
  color: var(--sky-deep);
  font-weight: 700;
}

.sidebar-item--login {
  color: var(--text-mute);
}

.sidebar-item--login:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.icon {
  font-size: 15px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0 12px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.sidebar-species {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-species-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.sidebar-species-item:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.sidebar-species-item.active {
  font-weight: 700;
  color: var(--sky-deep);
  background: var(--sky-light);
}

.sidebar-species-item span {
  font-size: 11px;
  color: var(--text-mute);
  background: var(--border);
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-species-all {
  display: block;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--sky-dark);
  border-radius: 8px;
  margin-top: 4px;
  font-weight: 600;
}

.sidebar-species-all:hover {
  background: var(--sky-pale);
}

/* ═══════════════════════════════════════
   사이드바 아코디언
═══════════════════════════════════════ */
.sidebar-accordion {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-accordion-btn:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.sidebar-accordion-btn.active {
  background: var(--sky-light);
  color: var(--sky-deep);
  font-weight: 700;
}

.sidebar-accordion-arrow {
  transition: transform 0.2s;
  color: var(--text-mute);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
}

.sidebar-accordion-body {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
}

.sidebar-accordion-body.open {
  display: flex;
}

.sidebar-subitem {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.sidebar-subitem:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.sidebar-subitem.active {
  color: var(--sky-deep);
  font-weight: 700;
  background: var(--sky-light);
}

.sidebar-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-accordion-head .sidebar-accordion-btn {
  flex: 1;
}

.sidebar-all-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--sky-deep);
  padding: 0 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.sidebar-login {
  color: var(--text-mute);
}

.sidebar-loading {
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-mute);
}

/* 사이드바 알림 뱃지 */
.sidebar-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #EF4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  padding: 0 4px;
  margin-left: auto;
}

/* ═══════════════════════════════════════
   사이드바 유저 블록 (모바일 전용)
═══════════════════════════════════════ */
.sidebar-user-block {
  display: none;
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sidebar-user-block .btn-login {
  display: block;
  text-align: center;
  width: 100%;
}

.sidebar-user-block .btn-logout {
  display: block;
  width: 100%;
  margin-left: 0;
  text-align: center;
}

/* ── 사이드바 가이드맵 버튼 ── */
.sidebar-guidemap-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

/* ── 가이드 활성 시 모바일 사이드바 최상위 표시 ── */
body.tour-sidebar-step .sidebar {
  z-index: 9983;
}

/* ═══════════════════════════════════════
   종족 플라이아웃 (PC 전용)
═══════════════════════════════════════ */
.species-flyout {
  display: none;
  position: fixed;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 14px 14px 0;
  box-shadow: 4px 8px 32px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 200;
  width: 220px;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  padding: 0;
  flex-direction: column;
}

.species-flyout.open {
  display: flex;
}

/* ── 종족 바텀시트 (모바일 전용) ── */
.species-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 400;
  opacity: 0;
  transition: opacity 0.25s;
}
.species-sheet-overlay.show {
  display: block;
  opacity: 1;
}

.species-sheet-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  z-index: 401;
  max-height: 75vh;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.species-sheet-panel.open {
  bottom: 0;
}

.species-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  #bodySpecies {
    display: none !important;
  }
}
.flyout-search-wrap {
  flex-shrink: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.flyout-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.flyout-search-input:focus {
  border-color: var(--sky-dark);
}

.flyout-scroll-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.flyout-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
}

.flyout-all-link {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-dark);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}

.flyout-all-link:hover {
  background: var(--sky-pale);
}

.flyout-group-label {
  padding: 8px 16px 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sky-deep);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.species-flyout .sidebar-subitem {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 0;
}

@media (min-width: 768px) {
  /* 아코디언 body 숨김 — 플라이아웃으로 대체 */
  #bodySpecies {
    display: none !important;
  }
  /* 화살표 오른쪽 방향 */
  #arrSpecies::after {
    content: "▶" !important;
  }
  /* 플라이아웃 열림 / 종족 페이지 active 상태 */
  #btnSpecies.flyout-open,
  #btnSpecies.active {
    background: var(--sky-light);
    color: var(--sky-deep);
    font-weight: 700;
  }
}
/* ═══════════════════════════════════════
   메인 콘텐츠
═══════════════════════════════════════ */
.main {
  flex: 1;
  min-width: 0;
}

/* ═══════════════════════════════════════
   섹션 공통
═══════════════════════════════════════ */
.section {
  padding: 40px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.btn-more {
  font-size: 13px;
  color: var(--sky-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-more:hover {
  color: var(--sky-deep);
}

/* ═══════════════════════════════════════
   종족 그리드
═══════════════════════════════════════ */
.species-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.species-grid--large {
  grid-template-columns: repeat(4, 1fr);
}

.species-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.species-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.species-img {
  width: 100%;
  aspect-ratio: 1;
  background: #F8FAFC;
}

.species-info {
  padding: 10px 12px;
}

.species-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.species-count {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 3px;
}

/* ═══════════════════════════════════════
   개체 그리드
═══════════════════════════════════════ */
.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.character-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.character-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.character-img {
  width: 100%;
  aspect-ratio: 3/4;
  background: #F8FAFC;
}

.character-info {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.character-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.character-species {
  font-size: 12px;
  color: var(--sky-dark);
  font-weight: 600;
  margin-top: 3px;
}

.character-owner {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
}

/* ═══════════════════════════════════════
   브레드크럼
═══════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mute);
}

.breadcrumb a:hover {
  color: var(--sky-dark);
}

.breadcrumb span {
  color: #CBD5E1;
}

.breadcrumb span:last-child {
  color: var(--text-sub);
}

/* ═══════════════════════════════════════
   공통 버튼
═══════════════════════════════════════ */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--sky-dark);
  color: var(--white);
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--sky-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--sky-dark);
  color: var(--sky-dark);
}

/* ═══════════════════════════════════════
   메타 공통
═══════════════════════════════════════ */
.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}

.meta-label {
  width: 60px;
  color: var(--text-mute);
  font-size: 12px;
  flex-shrink: 0;
  padding-top: 1px;
}

.meta-value {
  color: var(--text);
  min-width: 0;
  word-break: break-all;
  overflow-wrap: break-word;
}

.meta-link {
  color: var(--text);
  text-decoration: none;
}

.meta-link:hover {
  text-decoration: underline;
}

.meta-link {
  color: var(--sky-dark);
  font-weight: 600;
}

.meta-link:hover {
  color: var(--sky-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.count-badge {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-mute);
  margin-left: 6px;
}

/* ═══════════════════════════════════════
   검색
═══════════════════════════════════════ */
.search-wrap {
  padding: 32px 0 8px;
}

.search-box {
  position: relative;
  max-width: 480px;
}

.search-input {
  width: 100%;
  padding: 13px 44px 13px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.search-input::placeholder {
  color: #CBD5E1;
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-mute);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  list-style: none;
  z-index: 200;
  overflow: hidden;
  display: none;
}

.search-dropdown.active {
  display: block;
}

.search-dropdown li a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.1s;
}

.search-dropdown li a:hover {
  background: var(--sky-pale);
}

.dd-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 7px;
  border-radius: 5px;
}

.dd-badge--user {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.dd-badge--admin {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.dd-badge--staff {
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.dd-badge--species-owner {
  background: #E0F2FE;
  color: #0284C7;
  border: 1px solid #BAE6FD;
}

.dd-badge--species {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.dd-badge--char {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.dd-label {
  font-size: 13px;
  color: var(--text);
  margin-left: 4px;
}

.search-dropdown li + li {
  border-top: 1px solid var(--border);
}

.search-dropdown .dd-enter {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--sky-dark);
  font-weight: 600;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.search-dropdown .dd-enter:hover {
  background: var(--sky-pale);
}

/* ═══════════════════════════════════════
   목록 페이지
═══════════════════════════════════════ */
.list-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 40px;
}

.list-page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.list-page-count {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 4px;
}

.list-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.list-search {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: var(--white);
  transition: border-color 0.15s;
}

.list-search:focus {
  border-color: var(--sky);
}

.list-sort {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-sub);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  background: var(--white);
}

/* ═══════════════════════════════════════
   등록 폼
═══════════════════════════════════════ */
.register-wrap {
  padding: 40px 0;
}

.register-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.register-subtitle {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 36px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.form-input {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--sky);
}

.form-input::placeholder {
  color: #CBD5E1;
}

.form-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  background: var(--white);
  transition: border-color 0.15s;
}

.form-textarea:focus {
  border-color: var(--sky);
}

.form-textarea::placeholder {
  color: #CBD5E1;
}

.form-hint {
  font-size: 12px;
  color: var(--text-mute);
}

.form-label-sub {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 600;
  display: block;
}

.required {
  color: #EF4444;
  margin-left: 2px;
}

.img-upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--sky-pale);
}

.img-upload-box--portrait {
  aspect-ratio: 3/4;
  max-width: 160px;
}

.img-upload-box:hover {
  border-color: var(--sky);
  background: var(--sky-light);
}

.img-upload-text {
  font-size: 13px;
  color: var(--text-mute);
}

.img-upload-hint {
  font-size: 11px;
  color: #CBD5E1;
}

.img-upload-ratio {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}

.img-upload-meta {
  font-size: 11px;
  color: #CBD5E1;
  margin-top: 2px;
}

/* ── 크롭 모달 ─────────────────────────── */
.crop-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.crop-modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}

.crop-modal-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.crop-modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.crop-modal-header p {
  font-size: 12px;
  color: var(--text-mute);
}

.crop-modal-canvas {
  background: #1a1a1a;
  min-height: 280px;
  max-height: 400px;
  overflow: hidden;
  flex: 1;
}

.crop-modal-canvas img {
  display: block;
  max-width: 100%;
}

.crop-modal-footer {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.custom-field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.custom-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-field-row .form-input {
  flex: 1;
}

.btn-field-remove {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-mute);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s;
}

.btn-field-remove:hover {
  border-color: #EF4444;
  color: #EF4444;
}

.btn-field-add {
  background: var(--sky-pale);
  border: 1.5px dashed var(--sky);
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--sky-dark);
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-field-add:hover {
  background: var(--sky-light);
}

.custom-fields-register {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  background: var(--sky-pale);
  border-radius: var(--radius);
  border: 1.5px solid var(--sky-light);
}

.owner-type-tabs {
  display: flex;
  margin-bottom: 10px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  width: fit-content;
}

.owner-tab {
  padding: 8px 18px;
  background: var(--white);
  border: none;
  font-size: 13px;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.owner-tab.active {
  background: var(--sky-dark);
  color: var(--white);
}

.register-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

/* ═══════════════════════════════════════
   유저 프로필
═══════════════════════════════════════ */
.profile-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0 0;
  margin-bottom: 8px;
}

/* 아바타 + 스티커 레이어 컨테이너 (grid로 겹치기) */
.profile-avatar-outer {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.profile-avatar-outer > * {
  grid-area: 1 / 1;
}

/* 프로필 아바타 프레임 래퍼 */
.profile-avatar-wrap {
  display: inline-block;
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 20px;
  line-height: 0;
}

/* 프레임 — 이미지 위에 overlay */
.profile-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 4px solid transparent;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.profile-avatar-wrap.frame-mint::after            { border-color: #65D3AC; }
.profile-avatar-wrap.frame-orange::after          { border-color: #FEB066; }
.profile-avatar-wrap.frame-simple-sky::after      { border-color: #8FD3FF; }
.profile-avatar-wrap.frame-simple-lavender::after { border-color: #B9A7FF; }
.profile-avatar-wrap.frame-simple-rose::after     { border-color: #FF9FBC; }
.profile-avatar-wrap.frame-simple-lemon::after    { border-color: #FFD966; }
.profile-avatar-wrap.frame-simple-lime::after     { border-color: #A8E66E; }
.profile-avatar-wrap.frame-simple-gray::after     { border-color: #BFC7D5; }
.profile-avatar-wrap.frame-simple-blue::after     { border-color: #014498; }
.profile-avatar-wrap.frame-simple-red::after      { border-color: #B74549; }

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: #F8FAFC;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* 스티커 — grid overlay, 96px 이미지 기준 1.2배 */
.profile-sticker {
  width: 116px;
  height: 116px;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
  display: block;
}

.profile-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 모바일 전용 프로필 설정 버튼 — 기본 숨김 (미디어쿼리에서 표시) */
.profile-settings-btn-mobile {
  display: none;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-sub);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.profile-settings-btn-mobile:hover,
.profile-settings-btn-mobile.active {
  background: var(--sky-light);
  color: var(--sky-deep);
  border-color: var(--sky-deep);
}

/* 모바일: 세로 배치 */
@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .profile-header-info {
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .profile-name-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  /* 닉네임: 1줄 */
  .profile-name-row .profile-name {
    width: 100%;
    text-align: center;
  }
  /* 뱃지: 2줄 */
  .profile-name-row #profileRoleBadge {
    order: 2;
    width: 100%;
    text-align: center;
  }
  /* 데스크탑 ⚙ 버튼은 모바일에서 숨김 */
  .profile-name-row .profile-gear-btn {
    display: none;
  }
  /* 모바일 전용 설정 버튼 표시 */
  .profile-settings-btn-mobile {
    display: block;
  }
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-gear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-mute);
  font-size: 18px;
  padding: 3px 5px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: -10px;
}

.profile-gear-btn:hover {
  color: var(--text);
  background: var(--bg-sub);
}

.profile-gear-btn.active {
  color: var(--sky-deep);
  background: var(--sky-light);
}

.profile-bio {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

.profile-tos-inner {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.profile-tos-wrap {
  position: relative;
}

.profile-tos-wrap.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(to bottom, transparent, var(--white));
  pointer-events: none;
}

button.btn-more {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.profile-tos {
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--sky-pale);
  border: 1px solid var(--sky-light);
  border-radius: 10px;
}

.profile-tos-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.profile-tos-content {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
  white-space: pre-wrap;
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--sky-deep);
}

.stat-label {
  font-size: 12px;
  color: var(--text-mute);
}

.profile-stat-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
}

/* ═══════════════════════════════════════
   개체 상세
═══════════════════════════════════════ */
/* 상단 헤더 */
.char-page-header {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.char-page-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 8px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.char-page-id {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mute);
}

.char-page-owner {
  font-size: 13px;
  color: var(--text-mute);
}

.char-page-owner a {
  color: var(--sky-dark);
  font-weight: 700;
}

.char-page-owner a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 이미지 + 패널 */
.char-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
  min-height: 520px;
}

.char-img-wrap {
  flex: 0 0 55%;
  overflow: hidden;
}

.char-img-area {
  width: 100%;
  height: auto;
  min-height: 480px;
  background: #F8FAFC;
  overflow: hidden;
}

/* 오른쪽 정보 패널 */
.char-info-panel {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}

.char-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  gap: 8px;
}

.char-info-label {
  color: var(--text-mute);
  flex-shrink: 0;
  padding-top: 1px;
}

.char-info-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.char-info-link {
  color: var(--sky-dark);
}

.char-info-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.char-info-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.char-info-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.75;
}

.character-detail-top {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.character-detail-img {
  width: 260px;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  background: #F8FAFC;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.character-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}

.character-detail-number {
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.character-detail-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-top: -4px;
}

.character-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.character-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: var(--sky-light);
  color: var(--sky-deep);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}

.character-badge:hover {
  background: var(--sky);
  color: var(--white);
}

.character-badge--owner {
  background: #F1F5F9;
  color: var(--text-sub);
  font-weight: 500;
}

.character-badge--owner a {
  color: var(--sky-dark);
  font-weight: 700;
}

.character-badge--owner a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.character-detail-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.85;
  padding-bottom: 4px;
}

/* 커스텀 필드 격자 */
.char-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.char-stat-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-right: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
}

.char-stat-cell:nth-child(3n) {
  border-right: none;
}

.char-stat-cell:nth-last-child(-n+3):nth-child(3n+1),
.char-stat-cell:nth-last-child(-n+3):nth-child(3n+1) ~ .char-stat-cell {
  border-bottom: none;
}

.char-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.char-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ═══════════════════════════════════════
   종족 상세
═══════════════════════════════════════ */
.species-detail {
  padding: 40px 0 0;
}

.species-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 32px;
}

.species-detail-img {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  aspect-ratio: 1/1;
  background: #F8FAFC;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  align-self: flex-start;
}

.species-desc-full {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.species-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.species-detail-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.species-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.species-type-badge--open {
  background: #EAF4EE;
  color: #2E8A6C;
}

.species-type-badge--closed {
  background: #EEEDFB;
  color: #6655BB;
}

.species-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.species-detail-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
  white-space: pre-wrap;
}

.species-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.species-fields {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 8px;
}

.species-fields-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.species-fields-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-tag {
  padding: 5px 14px;
  background: var(--sky-pale);
  border: 1px solid var(--sky-light);
  border-radius: 20px;
  font-size: 12px;
  color: var(--sky-deep);
  font-weight: 600;
}

.sort-select select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-sub);
  outline: none;
  cursor: pointer;
  background: var(--white);
  font-family: inherit;
}

/* ═══════════════════════════════════════
   로그인 / 회원가입
═══════════════════════════════════════ */
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--sky-pale);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-mute);
  margin-top: -12px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--sky-dark);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-submit:hover {
  background: var(--sky-deep);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--border);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}

.auth-switch a {
  color: var(--sky-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-error {
  font-size: 13px;
  color: #EF4444;
  min-height: 18px;
}

.btn-username {
  color: var(--sky-deep);
  font-weight: 700;
  font-size: 14px;
}

.badge-admin {
  display: inline-block;
  padding: 3px 8px;
  background: #FEF3C7;
  color: #D97706;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
}

.badge-staff {
  display: inline-block;
  padding: 3px 8px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
}

.btn-logout {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  margin-left: 8px;
  transition: border-color 0.15s, color 0.15s;
}

.btn-logout:hover {
  border-color: #EF4444;
  color: #EF4444;
}

/* ═══════════════════════════════════════
   헤더 재화 표시
═══════════════════════════════════════ */
.header-currencies {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
  transition: background 0.15s;
}

.header-currencies:hover {
  background: var(--bg-sub, #f3f4f6);
}

.header-currency {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.currency-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
  vertical-align: middle;
}

.currency-amount {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

/* 사이드바 재화 (모바일용) */
.sidebar-currencies {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  margin-bottom: 10px;
}

.sidebar-currency-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 400;
}

/* ═══════════════════════════════════════
   홈 공지 바
═══════════════════════════════════════ */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 18px;
  margin-bottom: 16px;
}

.notice-bar-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-dark);
  background: var(--sky-light);
  border-radius: 4px;
  padding: 3px 9px;
  letter-spacing: 0.3px;
}

.notice-bar-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.notice-bar-title:hover {
  color: var(--sky-dark);
}

.notice-bar-more {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-mute);
  transition: color 0.15s;
}

.notice-bar-more:hover {
  color: var(--sky-dark);
}

/* ═══════════════════════════════════════
   공지사항 목록
═══════════════════════════════════════ */
.notice-list {
  border-top: 2px solid var(--border);
  margin-top: 8px;
}

.notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  transition: background 0.15s;
  color: inherit;
}

.notice-item:hover {
  background: var(--sky-pale);
}

.notice-item:hover .notice-title {
  color: var(--sky-deep);
}

.notice-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.notice-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.notice-pin {
  flex-shrink: 0;
  padding: 2px 8px;
  background: var(--sky-light);
  color: var(--sky-deep);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.notice-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.notice-date {
  font-size: 13px;
  color: var(--text-mute);
  white-space: nowrap;
}

.notice-arrow-right {
  font-size: 18px;
  color: var(--text-mute);
  line-height: 1;
}

.notice-pin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.notice-pin-check {
  width: 16px;
  height: 16px;
  accent-color: var(--sky-dark);
  cursor: pointer;
}

/* ═══════════════════════════════════════
   공지사항 상세
═══════════════════════════════════════ */
.notice-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 0;
  margin-bottom: 36px;
}

.notice-nav-count {
  font-size: 13px;
  color: var(--text-mute);
}

.notice-nav-list-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, color 0.15s;
}

.notice-nav-list-btn:hover {
  border-color: var(--sky-dark);
  color: var(--sky-dark);
}

/* 목록보기 토글 버튼 */
.notice-toggle-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-dark);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}

.notice-toggle-btn:hover {
  color: var(--sky-deep);
}

/* 전체 내용 보기 */
.notice-full-list {
  margin-top: 8px;
  border-top: 2px solid var(--border);
}

.notice-full-item {
  padding: 32px 0;
}

.notice-full-divider {
  height: 1px;
  background: var(--border);
}

.notice-full-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.notice-full-meta {
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 20px;
}

.notice-full-content {
  font-size: 15px;
  color: var(--text);
  line-height: 2;
}

.notice-detail-article {
  padding-bottom: 48px;
}

.notice-detail-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 12px;
}

.notice-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-mute);
}

.notice-detail-sep {
  color: var(--border);
}

.notice-detail-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.notice-detail-content {
  font-size: 15px;
  color: var(--text);
  line-height: 2;
}

.notice-detail-bottom {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   분양란 — 목록
═══════════════════════════════════════ */
.adoption-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 48px;
}

.adoption-card {
  position: relative;
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.adoption-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.adoption-card--closed:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

.adoption-card--closed .adoption-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.52);
  z-index: 2;
  pointer-events: none;
}

.adoption-card--closed .adoption-card-info {
  opacity: 0.5;
}

.adoption-card-img {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  background: #F8FAFC;
}

.adoption-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  width: 100%;
  max-width: 240px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 10;
}

.adoption-card-info {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.adoption-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.adoption-card-charname {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.adoption-card-species {
  font-size: 12px;
  color: var(--text-sub);
  margin: 3px 0 0;
}

/* 분양 타입 뱃지 */
.adoption-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--border);
  color: var(--text-sub);
}

.adoption-type--free {
  background: #DCFCE7;
  color: #16A34A;
}

.adoption-type--paid {
  background: #DBEAFE;
  color: var(--sky-deep);
}

.adoption-type--auction {
  background: #FEF3C7;
  color: #B45309;
}

/* 분양 상태 뱃지 */
.adoption-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.adoption-status--closed {
  background: #F1F5F9;
  color: var(--text-mute);
}

/* ═══════════════════════════════════════
   분양란 — 상세 레이아웃
═══════════════════════════════════════ */
.adoption-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.adoption-detail-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adoption-detail-img-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #F8FAFC;
  border: 1px solid var(--border);
}

.adoption-detail-imgs-extra {
  display: flex;
  gap: 8px;
}

.adoption-extra-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.adoption-detail-right {
  display: flex;
  flex-direction: column;
}

.adoption-detail-char-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.adoption-detail-species {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0;
}

/* 분양 정보 박스 */
.adoption-info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.auction-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.auction-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auction-info-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auction-info-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.adoption-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.adoption-desc-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

/* 연락 수단 */
.adoption-contact-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.adoption-contact-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   분양란 — 경매 섹션
═══════════════════════════════════════ */
.adoption-bids-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.adoption-bids-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.adoption-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.adoption-bid-count {
  font-size: 13px;
  color: var(--text-mute);
}

/* 낙찰 결과 박스 */
.adoption-winner-box {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.adoption-winner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.adoption-winner-trophy {
  font-size: 28px;
}

.adoption-winner-label {
  font-size: 11px;
  font-weight: 700;
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 2px;
}

.adoption-winner-name {
  font-size: 17px;
  font-weight: 800;
  color: #78350F;
  margin: 0 0 2px;
}

.adoption-winner-bid {
  font-size: 14px;
  color: #92400E;
  margin: 0;
}

/* 입찰 목록 */
.adoption-bid-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.adoption-bid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.adoption-bid-row:last-child {
  border-bottom: none;
}

.adoption-bid-row:nth-child(even) {
  background: var(--bg);
}

.adoption-bid-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.adoption-bid-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.adoption-bid-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--sky-deep);
}

.adoption-bid-time {
  font-size: 12px;
  color: var(--text-mute);
}

.bid-instant-badge {
  font-size: 12px;
  color: #7c3aed;
  font-weight: 700;
}

.bid-instant-desc {
  font-size: 12px;
  color: #7c3aed;
  font-weight: 700;
}

.bid-instant-notice {
  display: none;
}

.adoption-no-bids {
  padding: 24px;
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

/* 낙찰하기 버튼 */
.btn-award {
  padding: 5px 12px;
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #92400E;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-award:hover {
  background: #FEF3C7;
}

/* 입찰 입력 */
.adoption-bid-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.adoption-bid-input-wrap .form-input {
  flex: 1;
}

/* ═══════════════════════════════════════
   페이지 로딩
═══════════════════════════════════════ */
.page-loading {
  padding: 80px 0;
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
}

/* ═══════════════════════════════════════
   이전내역 페이지
═══════════════════════════════════════ */
.transfer-filter-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.transfer-filter-btn {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.transfer-filter-btn:hover {
  border-color: var(--sky);
  color: var(--sky-dark);
}

.transfer-filter-btn.active {
  background: var(--sky-dark);
  border-color: var(--sky-dark);
  color: var(--white);
}

.transfer-dir-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.transfer-dir--received {
  background: #DCFCE7;
  color: #16A34A;
}

.transfer-dir--sent {
  background: #DBEAFE;
  color: var(--sky-deep);
}

/* ═══════════════════════════════════════
   이전내역 테이블
═══════════════════════════════════════ */
.transfer-table {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}

.transfer-table-head,
.transfer-table-row {
  display: grid;
  grid-template-columns: 0.6fr 1.2fr 1fr 1fr 1fr 0.8fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
}

.transfer-table-head {
  background: #F8FAFC;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1.5px solid var(--border);
}

.transfer-table-row {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.12s;
}

.transfer-table-row:last-child {
  border-bottom: none;
}

.transfer-table-row:hover {
  background: var(--sky-pale);
}

.transfer-char {
  font-weight: 700;
  color: var(--text);
}

.transfer-species {
  color: var(--sky-dark);
  font-weight: 600;
}

.transfer-from,
.transfer-to {
  color: var(--text-sub);
}

.transfer-me {
  color: var(--sky-deep);
  font-weight: 700;
}

.transfer-method-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--sky-light);
  color: var(--sky-deep);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.transfer-date {
  color: var(--text-mute);
  font-size: 12px;
}

/* ═══════════════════════════════════════
   활동 서브탭 (종족 / 보유 캐릭터)
═══════════════════════════════════════ */
.activity-subtabs {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
}

.activity-subtab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.15s;
}

.activity-subtab:hover {
  color: var(--text-sub);
}

.activity-subtab.active {
  color: var(--sky-deep);
}

.activity-subtab.active::after {
  content: "";
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--sky-deep);
  border-radius: 2px 2px 0 0;
}

.activity-subtab-divider {
  color: var(--border);
  font-size: 16px;
  padding: 0 2px;
  user-select: none;
  line-height: 1;
  padding-bottom: 8px;
}

/* ═══════════════════════════════════════
   프로필 탭
═══════════════════════════════════════ */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-top: 32px;
}

.profile-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.15s;
}

.profile-tab:hover {
  color: var(--text-sub);
}

.profile-tab.active {
  color: var(--sky-deep);
}

.profile-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sky-deep);
  border-radius: 2px 2px 0 0;
}

/* ═══════════════════════════════════════
   설정 섹션
═══════════════════════════════════════ */
.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.settings-section-title--danger {
  color: #EF4444;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.label-muted {
  color: var(--text-mute);
  font-weight: 400;
  font-size: 12px;
}

.form-input--disabled {
  background: #F8FAFC;
  color: var(--text-mute);
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-success {
  font-size: 13px;
  color: #22C55E;
  min-height: 18px;
}

.settings-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #FFF5F5;
  border: 1.5px solid #FCA5A5;
  border-radius: var(--radius);
  gap: 16px;
}

.settings-danger-title {
  font-size: 14px;
  font-weight: 700;
  color: #EF4444;
  margin-bottom: 4px;
}

.settings-danger-desc {
  font-size: 13px;
  color: #F87171;
}

.btn-danger {
  flex-shrink: 0;
  padding: 9px 18px;
  background: #EF4444;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-danger:hover {
  background: #DC2626;
}

/* ═══════════════════════════════════════
   모달
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.modal-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ═══════════════════════════════════════
   빈 상태
═══════════════════════════════════════ */
.empty-state {
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-mute);
}

.empty-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  gap: 12px;
}

.empty-state-icon {
  font-size: 40px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-mute);
  text-align: center;
}

/* ═══════════════════════════════════════
   어드민
═══════════════════════════════════════ */
.section {
  padding: 24px 0;
}

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

.admin-detail-toggle {
  display: none;
  margin-bottom: 10px;
}

.admin-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}

.admin-write-form {
  background: var(--sky-pale);
  border: 1.5px solid var(--sky-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 2px solid var(--border);
  background: #F8FAFC;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.admin-table tbody tr:hover {
  background: var(--sky-pale);
}

.admin-table tbody td {
  padding: 12px 12px;
  vertical-align: middle;
}

.admin-table-title {
  font-weight: 600;
  color: var(--text);
}

.admin-btn-delete {
  padding: 5px 12px;
  background: #FEF2F2;
  color: #EF4444;
  border: 1.5px solid #FECACA;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-btn-delete:hover {
  background: #FEE2E2;
}

.admin-btn-grant {
  padding: 5px 12px;
  background: #F0FDF4;
  color: #16A34A;
  border: 1.5px solid #BBF7D0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-btn-grant:hover {
  background: #DCFCE7;
}

.admin-btn-revoke {
  padding: 5px 12px;
  background: #FFFBEB;
  color: #D97706;
  border: 1.5px solid #FDE68A;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-btn-revoke:hover {
  background: #FEF3C7;
}

.admin-btn-edit {
  padding: 5px 12px;
  background: #EFF6FF;
  color: #2563EB;
  border: 1.5px solid #BFDBFE;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-btn-edit:hover {
  background: #DBEAFE;
}

/* 어드민 카드 리스트 */
.admin-card-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}

.admin-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background 0.1s;
}

.admin-card-row:last-child {
  border-bottom: none;
}

.admin-card-row:hover {
  background: var(--sky-pale);
}

.admin-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.admin-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.admin-card-meta {
  font-size: 12px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-date {
  font-size: 12px;
  color: var(--text-mute);
  white-space: nowrap;
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   개체 섹션 편집 카드
═══════════════════════════════════════ */
.section-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.section-card.dragging {
  opacity: 0.45;
}

.section-card.drag-over {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-light);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
}

.section-card-header:active {
  cursor: grabbing;
}

.section-drag-handle {
  color: var(--text-mute);
  font-size: 14px;
  letter-spacing: 1px;
}

.section-card-label {
  font-weight: 700;
  font-size: 13px;
  flex: 1;
  color: var(--text);
}

.section-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-card-body .form-input,
.section-card-body .form-textarea,
.section-card-body select.form-input {
  width: 100%;
  box-sizing: border-box;
}

.relation-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.relation-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

/* Quill 리치텍스트 표시용 공통 스타일 */
.ql-display .ql-align-center {
  text-align: center;
}

.ql-display .ql-align-right {
  text-align: right;
}

.ql-display .ql-align-justify {
  text-align: justify;
}

.ql-display ol, .ql-display ul {
  padding-left: 1.5em;
}

.ql-display li {
  margin-bottom: 2px;
}

.ql-display strong {
  font-weight: 700;
}

.ql-display em {
  font-style: italic;
}

.ql-display u {
  text-decoration: underline;
}

.ql-display s {
  text-decoration: line-through;
}

.ql-display a {
  color: var(--sky-dark);
  text-decoration: underline;
}

.ql-display p {
  margin: 0 0 4px;
}

/* 개체 섹션 표시 */
.char-sections {
  margin-top: 28px;
}

/* 관계 카드 */
.relation-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #fff;
}

.relation-card:last-child {
  margin-bottom: 0;
}

.relation-card-duo {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  gap: 12px;
  background: #f8fafc;
}

.relation-char-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.relation-char-side--right .relation-char-name {
  color: var(--sky-dark);
}

.relation-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #e2e8f0;
  flex-shrink: 0;
  display: block;
}

.relation-avatar-placeholder {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-light), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--sky-deep);
  flex-shrink: 0;
  border: 2px solid var(--sky-light);
}

.relation-char-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.relation-char-name:hover {
  text-decoration: underline;
}

.relation-char-species {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.relation-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 4px;
}

.relation-type-badge {
  background: var(--sky-light);
  color: var(--sky-deep);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--sky);
  white-space: nowrap;
}

.relation-arrows {
  font-size: 16px;
  color: var(--text-mute);
  letter-spacing: -2px;
}

.relation-card-desc {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
}

/* 헤더 종족주 뱃지 */
.badge-role {
  display: inline-block;
  padding: 3px 8px;
  background: #E0F2FE;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #0369A1;
  margin-right: 4px;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

/* 어드민 유저 목록 종족주 뱃지 */
.badge-species-owner {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #F0FDF4;
  color: #16A34A;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.badge-user {
  display: inline-block;
  padding: 3px 8px;
  background: #F1F5F9;
  color: var(--text-sub);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   알림 — 헤더 벨
═══════════════════════════════════════ */
.notif-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.notif-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.notif-bell-btn:hover {
  background: var(--sky-light);
  color: var(--sky-dark);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  background: #EF4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  width: 320px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.notif-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.notif-read-all-btn {
  border: none;
  background: none;
  font-size: 12px;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.notif-read-all-btn:hover {
  color: var(--sky-dark);
}

.notif-panel-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  cursor: pointer;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--sky-pale);
}

.notif-item--unread {
  background: #F0F9FF;
  border-left: 3px solid var(--sky-dark);
}

.notif-item--unread:hover {
  background: #E0F2FE;
}

.notif-msg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.notif-time {
  font-size: 11px;
  color: var(--text-mute);
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
}

/* 분양 상태 — 확인 대기중 */
.adoption-status--pending {
  background: #FEF3C7;
  color: #D97706;
}

/* ═══════════════════════════════════════
   종족주 가이드 탭 (상세페이지)
═══════════════════════════════════════ */
.guide-tabs {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.guide-tab-nav {
  display: flex;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.guide-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.guide-tab-btn + .guide-tab-btn {
  border-left: 1px solid var(--border);
}

.guide-tab-btn:hover {
  color: var(--text-sub);
  background: var(--sky-pale);
}

.guide-tab-btn.active {
  color: var(--sky-deep);
  background: #fff;
}

.guide-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sky-deep);
  border-radius: 2px 2px 0 0;
}

.guide-tab-panel {
  display: none;
  padding: 24px;
  background: #fafbfc;
}

.guide-tab-panel.active {
  display: block;
}

.guide-panel-img {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
}

.guide-section-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
  margin: 0;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════
   종족 설정 체크박스 선택 행
═══════════════════════════════════════ */
.guide-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.guide-check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.guide-check-item:hover {
  border-color: var(--sky);
  color: var(--sky-dark);
  background: var(--sky-pale);
}

.guide-check-item input[type=checkbox] {
  accent-color: var(--sky-dark);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.guide-check-item:has(input:checked) {
  border-color: var(--sky-dark);
  background: var(--sky-light);
  color: var(--sky-deep);
}

.guide-section-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: #FAFBFC;
}

.guide-section-block .guide-content {
  width: 100%;
  box-sizing: border-box;
}

.guide-section-head-fixed {
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════
   종족 설정 수정/등록 폼
═══════════════════════════════════════ */
.form-hint-inline {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mute);
  margin-left: 6px;
}

.guide-section-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: #FAFBFC;
}

.guide-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.guide-section-label {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-deep);
  background: var(--sky-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.guide-add-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.guide-add-btn {
  padding: 7px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.guide-add-btn:hover {
  border-color: var(--sky);
  color: var(--sky-dark);
  background: var(--sky-pale);
}

.guide-img-area {
  margin-top: 10px;
}

.guide-img-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 120px;
  height: 80px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background: #FAFBFC;
  transition: border-color 0.15s;
}

.guide-img-box:hover {
  border-color: var(--sky);
}

.guide-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-img-placeholder {
  font-size: 12px;
  color: var(--text-mute);
  padding: 0 12px;
  pointer-events: none;
}

.guide-img-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}

/* ═══════════════════════════════════════
   민감한 요소 블러 오버레이
═══════════════════════════════════════ */
.blurred {
  opacity: 0;
}

.sensitive-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  border-radius: inherit;
  background: #fff;
  padding: 12px;
  overflow-y: auto;
}

.sensitive-overlay-note {
  background: rgba(185, 28, 28, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  pointer-events: none;
  text-align: center;
  line-height: 1.6;
  word-break: keep-all;
  white-space: normal;
}

.sensitive-overlay-hint {
  color: #aaa;
  font-size: 11px;
  margin-top: 4px;
  pointer-events: none;
  text-align: center;
}

/* ═══════════════════════════════════════
   햄버거 버튼
═══════════════════════════════════════ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  flex-shrink: 0;
  margin-right: 4px;
}

.hamburger-btn:hover {
  background: var(--sky-pale);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-sub);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.hamburger-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 드로어 오버레이 */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 299;
  opacity: 0;
  transition: opacity 0.25s;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ═══════════════════════════════════════
   반응형 — 태블릿 (768px ~ 1023px)
═══════════════════════════════════════ */
@media (max-width: 1023px) {
  .sidebar {
    width: 176px;
  }
  .species-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .species-grid--large {
    grid-template-columns: repeat(3, 1fr);
  }
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .adoption-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}
/* ═══════════════════════════════════════
   반응형 — 모바일 (~ 767px)
═══════════════════════════════════════ */
@media (max-width: 767px) {
  /* 헤더 */
  .header-inner {
    padding: 0 14px;
    justify-content: flex-start;
    gap: 4px;
  }
  .hamburger-btn {
    display: flex;
  }
  .header-inner .logo {
    flex: none;
    text-align: left;
  }
  .header-nav {
    display: none;
  }
  /* 사이드바 유저 블록 표시 */
  .sidebar-user-block {
    display: block;
  }
  /* 레이아웃 */
  .layout {
    padding: 0 14px;
    gap: 0;
  }
  /* 사이드바 → 드로어 */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100dvh;
    z-index: 300;
    background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 70px 16px 40px;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }
  .sidebar--open {
    left: 0;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.14);
  }
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }
  .sidebar-overlay.show {
    pointer-events: auto;
  }
  /* 메인 */
  .main {
    width: 100%;
    min-width: 0;
  }
  /* 그리드 — 기종에 따른 반응형 */
  .species-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .species-grid--large {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .adoption-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  /* 홈 종족 섹션: 12개(2×6)만 표시, 전체보기 페이지는 제외 */
  .species-grid:not(.species-grid--large) .species-card:nth-child(n+13) {
    display: none;
  }
  /* 더 좁은 화면 (< 400px) — 종족 2열 */
}
@media (max-width: 400px) {
  .species-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .species-grid--large {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .adoption-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .species-name {
    font-size: 11px;
  }
  .character-name {
    font-size: 12px;
  }
}
@media (max-width: 767px) {
  /* 분양 상세 — 1열 */
  .adoption-detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* 목록 헤더 */
  .list-page-header {
    padding-top: 18px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .list-page-title {
    font-size: 18px;
  }
  /* 검색 + 필터 컨트롤 — 검색창 1줄, 드롭다운 2개 나란히 */
  .list-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  .list-controls .list-search {
    flex: 1 0 100%;
    max-width: calc(100% - 8px);
    margin: 0 auto;
  }
  .list-controls .list-sort {
    flex: 1;
  }
  /* 등록 폼 */
  .register-wrap {
    padding: 18px 0;
  }
  .register-title {
    font-size: 20px;
  }
  /* 검색 */
  .search-wrap {
    padding: 14px 0 4px;
  }
  .search-input {
    font-size: 14px;
  }
  .search-box {
    max-width: calc(100% - 20px);
    margin: 0 auto;
  }
  /* 개체 상세 */
  .character-detail-top {
    flex-direction: column;
    gap: 20px;
  }
  .character-detail-img {
    width: 100%;
    max-width: 220px;
  }
  .char-body {
    flex-direction: column;
    min-height: unset;
  }
  .char-img-wrap {
    flex: none;
    width: 100%;
  }
  .char-img-area {
    min-height: unset;
  }
  .char-info-panel {
    padding: 20px 4px;
  }
  /* 종족 상세 */
  .species-detail-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .species-detail-img {
    flex: none;
    width: 180px;
    height: 180px;
  }
  .species-detail-info {
    width: 100%;
  }
  .species-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .species-detail-actions > * {
    text-align: center;
    justify-content: center;
    width: 100%;
  }
  /* 알림 패널 — 전체 너비 */
  .notif-panel {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  /* 이전 내역 테이블 — 모바일 카드형 */
  .transfer-table-head {
    display: none;
  }
  .transfer-table-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 0;
    padding: 12px 14px;
  }
  /* 1행: 뱃지 + 날짜 */
  .transfer-table-row .transfer-dir {
    order: 1;
    flex-shrink: 0;
  }
  .transfer-table-row .transfer-date {
    order: 1;
    margin-left: auto;
    font-size: 11px;
  }
  /* 2행: 캐릭터 */
  .transfer-table-row .transfer-char {
    order: 2;
    width: 100%;
    font-size: 15px;
    margin-top: 6px;
  }
  /* 3행: 종족 */
  .transfer-table-row .transfer-species {
    order: 3;
    width: 100%;
    font-size: 12px;
    margin-top: 1px;
  }
  /* 4행: 보낸사람 → 받은사람 */
  .transfer-table-row .transfer-from,
  .transfer-table-row .transfer-to {
    order: 4;
    font-size: 13px;
    margin-top: 6px;
  }
  .transfer-table-row .transfer-from::after {
    content: " →";
    color: var(--text-mute);
  }
  /* 5행: 방법 */
  .transfer-table-row .transfer-method-badge {
    order: 5;
    margin-top: 6px;
  }
  /* 폼 버튼 */
  .register-actions {
    flex-direction: column-reverse;
  }
  .register-actions .btn-ghost,
  .register-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  /* 모달 */
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }
  .modal-card {
    border-radius: 16px 16px 12px 12px;
    max-width: 100%;
  }
  #badgeModal {
    align-items: center;
  }
  /* 공지사항 */
  .notice-date {
    display: none;
  }
  /* 어드민 탭 — 균등 배분 */
  .profile-tab {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    font-size: 13px;
  }
  /* 어드민 개체 검색창 */
  #charAdminSearch {
    width: 100% !important;
  }
  /* 어드민 카드 — 모바일에서 날짜 숨김 (버튼 공간 확보) */
  .admin-card-date {
    display: none;
  }
  /* 어드민 테이블 → 카드형 */
  .admin-table thead {
    display: none;
  }
  .admin-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 0;
    padding: 12px 14px;
    border-bottom: 1.5px solid var(--border);
  }
  .admin-table tbody td {
    padding: 0;
    border: none;
    vertical-align: unset;
  }
  /* 공지·유저: 테이블 레이아웃 유지, thead 표시 */
  .admin-table--notices thead,
  .admin-table--users thead {
    display: table-header-group;
  }
  .admin-table--notices tbody tr,
  .admin-table--users tbody tr {
    display: table-row;
  }
  .admin-table--notices td,
  .admin-table--users td {
    padding: 12px 10px;
    font-size: 14px;
    vertical-align: middle;
  }
  .admin-table--notices .admin-btn-delete,
  .admin-table--users .admin-btn-delete,
  .admin-table--users .admin-btn-grant,
  .admin-table--users .admin-btn-revoke {
    white-space: nowrap;
  }
  /* 유저: 이메일·가입일 기본 숨김 */
  .admin-table--users thead th:nth-child(2),
  .admin-table--users tbody td:nth-child(2),
  .admin-table--users thead th:nth-child(4),
  .admin-table--users tbody td:nth-child(4) {
    display: none;
  }
  /* 유저 토글 on */
  .admin-table--users.show-details thead th:nth-child(2),
  .admin-table--users.show-details tbody td:nth-child(2),
  .admin-table--users.show-details thead th:nth-child(4),
  .admin-table--users.show-details tbody td:nth-child(4) {
    display: table-cell;
  }
  /* 토글 UI */
  .admin-detail-toggle {
    display: block;
  }
  /* 종족·개체: 테이블 레이아웃 유지, thead 표시 */
  .admin-table--species thead,
  .admin-table--chars thead {
    display: table-header-group;
  }
  .admin-table--species tbody tr,
  .admin-table--chars tbody tr {
    display: table-row;
  }
  .admin-table--species td,
  .admin-table--chars td {
    padding: 12px 10px;
    font-size: 14px;
  }
  .admin-table--species .admin-btn-delete,
  .admin-table--chars .admin-btn-delete {
    white-space: nowrap;
  }
  /* 등록일 기본 숨김 */
  .admin-table--species thead th:nth-child(3),
  .admin-table--species tbody td:nth-child(3) {
    display: none;
  }
  .admin-table--chars thead th:nth-child(4),
  .admin-table--chars tbody td:nth-child(4) {
    display: none;
  }
  /* 토글 on 시 표시 */
  .admin-table--species.show-dates thead th:nth-child(3),
  .admin-table--species.show-dates tbody td:nth-child(3) {
    display: table-cell;
  }
  .admin-table--chars.show-dates thead th:nth-child(4),
  .admin-table--chars.show-dates tbody td:nth-child(4) {
    display: table-cell;
  }
  /* 입찰 목록 — 즉분가 안내문 분리 */
  .bid-instant-notice {
    display: block;
    font-size: 12px;
    color: #7c3aed;
    font-weight: 700;
    padding: 8px 16px 2px;
    background: #faf5ff;
  }
  .bid-instant-desc {
    display: none;
  }
}
/* ═══════════════════════════════════════
   페이지네이션
═══════════════════════════════════════ */
#paginationWrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 8px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.pg-btn:hover:not([disabled]) {
  border-color: var(--sky-dark);
  color: var(--sky-dark);
}

.pg-btn.active {
  background: var(--sky-dark);
  border-color: var(--sky-dark);
  color: var(--white);
  font-weight: 700;
}

.pg-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.pg-gap {
  color: var(--text-mute);
  font-size: 14px;
  padding: 0 2px;
  user-select: none;
}

/* ═══════════════════════════════════════
   이용 가이드 (고정 페이지)
═══════════════════════════════════════ */
.guide-static-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.guide-static-toc-item {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--sky-pale);
  border: 1.5px solid var(--sky-light);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-deep);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.guide-static-toc-item:hover {
  background: var(--sky-light);
  border-color: var(--sky);
  color: var(--sky-dark);
}

.guide-static-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ═══════════════════════════════════════
   뱃지 모달
═══════════════════════════════════════ */
.badge-modal-card {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px 28px;
  max-width: 280px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.badge-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-mute);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.badge-modal-close:hover {
  color: var(--text);
}

.badge-modal-img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.badge-modal-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.badge-modal-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.badge-modal-date {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-mute);
}

/* ═══════════════════════════════════════
   뱃지 전시대
═══════════════════════════════════════ */
.badge-showcase {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge-showcase img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  transition: transform 0.15s ease;
}

.badge-showcase img:hover {
  transform: scale(1.08);
}

.badge-showcase img.badge-unearned {
  filter: grayscale(100%);
  opacity: 0.4;
}

.guide-static-section {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.guide-static-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.guide-static-section-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--sky-dark);
  background: var(--sky-light);
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.guide-static-section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.guide-static-section-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.85;
}

.guide-static-section-content strong {
  color: var(--sky-deep);
  font-weight: 700;
}

.guide-static-section-content em {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

/* 용어 목록 */
.guide-static-term-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-static-term-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.guide-static-term-label {
  flex-shrink: 0;
  min-width: 52px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sky-deep);
  background: var(--sky-light);
  padding: 3px 10px;
  border-radius: 6px;
  text-align: center;
  margin-top: 1px;
}

.guide-static-term-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
}

/* 팁 박스 */
.guide-static-tip {
  background: var(--sky-pale);
  border: 1.5px solid var(--sky-light);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
}

.guide-static-tip ul {
  margin: 10px 0 0 4px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-static-tip--warn {
  background: var(--white);
  border: 1.5px solid var(--sky-light);
  border-left: 4px solid var(--sky-dark);
  color: var(--text);
  margin-top: 8px;
}

/* FAQ */
.guide-static-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-static-faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.guide-static-faq-item[open] {
  border-color: var(--sky-light);
}

.guide-static-faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.guide-static-faq-q::-webkit-details-marker {
  display: none;
}

.guide-static-faq-q::before {
  content: "Q";
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--sky-dark);
  background: var(--sky-light);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-static-faq-item[open] .guide-static-faq-q {
  background: var(--sky-pale);
}

.guide-static-faq-a {
  padding: 14px 18px 18px 52px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
  border-top: 1px solid var(--border);
}

/* 이미지 블록 */
.guide-static-tip--warn + .guide-static-figure {
  margin-top: 20px;
}

.guide-static-figure {
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guide-static-img {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.guide-static-caption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
}

/* 첫 섹션 상단 여백 제거 */
.guide-static-section--first {
  border-top: none;
  padding-top: 0;
}

/* 반응형 */
@media (max-width: 767px) {
  .guide-static-toc {
    gap: 6px;
    padding: 14px;
    margin-bottom: 24px;
  }
  .guide-static-toc-item {
    font-size: 12px;
    padding: 6px 12px;
  }
  .guide-static-section {
    padding: 28px 0;
  }
  .guide-static-section-title {
    font-size: 17px;
  }
  .guide-static-section-content {
    font-size: 14px;
  }
  .guide-static-term-item {
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
  }
  .guide-static-faq-a {
    padding-left: 18px;
  }
}
/* ── 업적 토스트 ──────────────────────── */
.achievement-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--white);
  border: 2px solid var(--sky);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.18);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  pointer-events: none;
  max-width: 300px;
}

.achievement-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.achievement-toast-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.achievement-toast-body {
  min-width: 0;
}

.achievement-toast-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-deep);
  margin: 0 0 2px;
  letter-spacing: 0.3px;
}

.achievement-toast-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.achievement-toast-desc {
  font-size: 11px;
  color: var(--text-light, #888);
  margin: 3px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .achievement-toast {
    bottom: 80px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    max-width: min(320px, 90vw);
  }
  .achievement-toast.show {
    transform: translateX(-50%) translateY(0);
  }
}
/* ── 업적 통계 & 진행률 ── */
.achievement-stats {
  margin-bottom: 14px;
}

.achievement-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.achievement-stats-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.achievement-stats-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--sky-deep);
}

.achievement-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.achievement-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6ec1ff, #8fd3ff, #b7e4ff);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-progress-fill.complete {
  background: linear-gradient(90deg, #f9c74f, #f8961e, #f3722c);
}

/* ── 업적 카테고리 ── */
.achievement-categories {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.ach-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ach-category-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.4px;
  margin: 0;
  text-transform: uppercase;
}

.ach-category-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
}

/* ── 프로필 대표 업적 ── */
.ach-featured-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  margin: 12px 0 6px;
  letter-spacing: 0.3px;
}

.ach-featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ach-featured-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.ach-featured-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ── 업적 아이콘 ── */
.ach-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ach-icon-wrap.transparent {
  background: transparent;
  border-radius: 0;
}

.ach-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

/* ── 업적 목록 ── */
.achievement-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

@media (min-width: 600px) {
  .achievement-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .achievement-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: box-shadow 0.18s, transform 0.18s;
}

.achievement-item.earned {
  box-shadow: 0 1px 4px rgba(110, 193, 255, 0.1);
}

.achievement-item.earned:hover {
  box-shadow: 0 4px 14px rgba(110, 193, 255, 0.22);
  transform: translateY(-2px);
}

.achievement-item.locked {
  opacity: 0.45;
}

.achievement-item-body {
  flex: 1;
  min-width: 0;
}

.achievement-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.3;
}

.achievement-item-desc {
  font-size: 11px;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.4;
}

.achievement-item-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--sky-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.achievement-item-status {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   가이드 투어 (Guide Tour)
═══════════════════════════════════════ */
/* ── 오버레이 ── */
.tour-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9980;
  pointer-events: none;
}

.tour-overlay--active {
  display: block;
  pointer-events: auto;
}

/* ── 스포트라이트 ── */
.tour-spotlight {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
  z-index: 9981;
  pointer-events: none;
  opacity: 0;
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.25s;
  outline: 2px dashed rgba(255, 255, 255, 0.45);
  outline-offset: 3px;
}

/* ── 툴팁 말풍선 ── */
.tour-tooltip {
  display: none;
  position: fixed;
  width: 284px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 16px 14px;
  z-index: 9982;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.2s;
}

.tour-tt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tour-tt-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-deep);
  background: var(--sky-pale);
  padding: 3px 9px;
  border-radius: 99px;
  line-height: 1.5;
}

.tour-tt-close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-mute);
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}

.tour-tt-close:hover {
  background: var(--border);
}

.tour-tt-step-label {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 5px;
}

.tour-tt-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.4;
}

.tour-tt-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 14px;
}

.tour-tt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Step dots ── */
.tour-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: width 0.2s, background 0.2s;
  flex-shrink: 0;
}

.tour-dot--on {
  width: 18px;
  border-radius: 4px;
  background: var(--sky-dark);
}

/* ── 버튼 ── */
.tour-tt-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.tour-btn {
  padding: 7px 15px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: background 0.15s;
}

.tour-btn--next, .tour-btn--done {
  background: var(--sky-dark);
  color: #fff;
}

.tour-btn--next:hover, .tour-btn--done:hover {
  background: var(--sky-deep);
}

.tour-btn--prev {
  background: #f1f5f9;
  color: var(--text-sub);
}

.tour-btn--prev:hover {
  background: var(--border);
}

/* ── 카테고리 선택 모달 ── */
.tour-modal-wrap {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tour-modal-wrap--open {
  display: flex;
}

.tour-modal {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 20px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.tour-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tour-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tour-modal-close-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-mute);
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}

.tour-modal-close-btn:hover {
  background: var(--border);
}

.tour-modal-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

.tour-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tour-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.tour-cat-card:hover {
  border-color: var(--sky-dark);
  background: var(--sky-pale);
  transform: translateY(-1px);
}

.tour-cat-card--done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tour-cat-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}

.tour-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tour-cat-desc {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.45;
}

.tour-cat-badge-done {
  font-size: 10px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 5px;
}

/* ── 완료 토스트 ── */
.tour-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1e293b;
  color: #fff;
  padding: 11px 22px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10010;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.tour-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 태블릿 이상 툴팁 폭 넓히기 ── */
@media (min-width: 600px) {
  .tour-tooltip {
    width: 320px;
  }
}

/* ═══════════════════════════════════════
   내 지갑
═══════════════════════════════════════ */

/* 섹션 제목 */
.wallet-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ── 재화 한 줄 ── */
.wallet-currency-row {
  display: flex;
  align-items: center;
}

.wallet-currency-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-currency-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 20px;
  flex-shrink: 0;
}

.wallet-currency-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  object-fit: contain;
}

.wallet-currency-name {
  font-size: 13px;
  color: var(--text-sub);
}

.wallet-currency-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-left: 4px;
}

.wallet-currency-amount--muted {
  color: var(--text-mute);
}

/* ── 전송 카드 ── */
.wallet-transfer-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  overflow: visible;
}

.wallet-tf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
}

.wallet-tf-row:first-child {
  padding-top: 14px;
}

.wallet-tf-row--last {
  padding-bottom: 14px;
}

/* 받는 사람 드롭다운 기준 */
.wallet-tf-recipient-wrap {
  position: relative;
}

.wallet-tf-label {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
  width: 68px;
  flex-shrink: 0;
}

.wallet-tf-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.wallet-tf-input::placeholder {
  color: #CBD5E1;
}

.wallet-tf-balance {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  flex-shrink: 0;
}

.wallet-tf-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 18px 14px;
}

.wallet-tf-error {
  font-size: 12px;
  color: #EF4444;
  flex: 1;
  margin: 0;
}

.wallet-tf-btn {
  padding: 5px 16px;
  background: var(--sky-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}

.wallet-tf-btn:hover {
  background: var(--sky-deep);
}

/* 재화 선택 토글 */
.wallet-tf-currency-select {
  display: flex;
  gap: 6px;
}

.wallet-tf-currency-btn {
  padding: 4px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}

.wallet-tf-currency-btn.active {
  border-color: var(--sky-dark);
  background: var(--sky-pale);
  color: var(--sky-dark);
}

/* ── 유저 검색 드롭다운 ── */
.wallet-recipient-list {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 180px;
  overflow-y: auto;
  z-index: 30;
  font-size: 13px;
}

.wallet-recipient-item {
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.1s;
}

.wallet-recipient-item:last-child {
  border-bottom: none;
}

.wallet-recipient-item:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.wallet-recipient-sub {
  font-size: 11px;
  color: var(--text-mute);
  margin-left: 6px;
}

.wallet-recipient-empty {
  padding: 10px 14px;
  color: var(--text-mute);
  font-size: 13px;
}

/* 거래 내역 테이블 — 6컬럼 */
.wallet-log-table .transfer-table-head,
.wallet-log-table .transfer-table-row {
  grid-template-columns: 1.1fr 0.7fr 0.8fr 0.8fr 0.9fr 1.2fr;
}

/* 금액 색상 */
.wallet-log-amount--plus {
  color: #16A34A;
  font-weight: 700;
}

.wallet-log-amount--minus {
  color: var(--sky-deep);
  font-weight: 700;
}

/* 거래 유형 뱃지 */
.wallet-log-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wallet-log-type--receive {
  background: #DCFCE7;
  color: #16A34A;
}

.wallet-log-type--send {
  background: #DBEAFE;
  color: var(--sky-deep);
}

.wallet-log-type--admin {
  background: #FEF3C7;
  color: #92400E;
}

/* 재화 전송 확인 모달 */
.wallet-confirm-table {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 0;
  margin: 14px 0 12px;
}

.wallet-confirm-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 16px;
  gap: 12px;
}

.wallet-confirm-row + .wallet-confirm-row {
  border-top: 1px solid var(--border);
}

.wallet-confirm-label {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
  flex-shrink: 0;
}

.wallet-confirm-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.wallet-confirm-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--sky-deep);
}

.wallet-confirm-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--sky-dark);
  margin-left: 2px;
}

.wallet-confirm-warning {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 16px;
}

.wallet-confirm-cancel,
.wallet-confirm-submit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  white-space: nowrap;
}

/* PC에서 숨길 모바일 전용 요소 */
.wlog-mobile-line1   { display: none; }
.wlog-note-mobile    { display: none; }
.wlog-note-label     { display: none; }
.wlog-note-text      { display: none; }
.wlog-currency-label { display: none; }

/* 내 지갑 — 모바일 */
@media (max-width: 767px) {
  .wallet-transfer-card,
  .wallet-recipient-list { max-width: 100%; }

  /* 거래 내역 — 1~2줄 컴팩트 */
  .wallet-log-table .transfer-table-head { display: none; }

  .wallet-log-table .transfer-table-row {
    display: flex;
    flex-direction: column;
    padding: 7px 12px;
    gap: 0;
  }

  /* PC 셀 전부 숨김 */
  .wallet-log-table .wlog-date,
  .wallet-log-table .wlog-type,
  .wallet-log-table .wlog-amount,
  .wallet-log-table .wlog-balance,
  .wallet-log-table .wlog-counterpart,
  .wallet-log-table .wlog-note { display: none; }

  /* 1줄: 뱃지 + 금액 + 재화명 (좌) | 상대방·시간 (우) */
  .wlog-mobile-line1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    line-height: 1.3;
  }

  .wlog-mobile-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
  }

  .wlog-badge-mobile {
    font-size: 10px;
    padding: 1px 5px;
    flex-shrink: 0;
  }

  .wlog-mobile-left .wallet-log-amount--plus,
  .wlog-mobile-left .wallet-log-amount--minus {
    font-size: 13px;
    font-weight: 700;
  }

  .wlog-currency-label {
    display: inline;
    font-size: 11px;
    color: var(--text-sub);
    flex-shrink: 0;
  }

  .wlog-mobile-right {
    font-size: 11px;
    color: var(--text-mute);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
  }

  /* 2줄: 메모 (있을 때만) */
  .wlog-note-mobile {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 3px;
    background: #F8FAFC;
    border-left: 2px solid var(--border);
    border-radius: 0 3px 3px 0;
    max-width: 100%;
    overflow: hidden;
  }

  .wlog-note-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-mute);
    padding: 2px 6px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .wlog-note-text {
    display: block;
    font-size: 11px;
    color: var(--text-mute);
    padding: 2px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
}

/* ═══════════════════════════════════════
   사이드바 단일 링크 (아코디언 없는 최상위 메뉴)
═══════════════════════════════════════ */
.sidebar-top-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.sidebar-top-link:hover {
  background: var(--sky-pale);
  color: var(--sky-dark);
}

.sidebar-top-link.active {
  background: var(--sky-light);
  color: var(--sky-deep);
  font-weight: 700;
}

/* ═══════════════════════════════════════
   출석 시스템
═══════════════════════════════════════ */

/* 요약 카드 그리드 */
.attn-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}

.attn-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 12px 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.attn-summary-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 500;
  white-space: nowrap;
}

.attn-summary-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.attn-summary-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--sky-deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.attn-summary-value--sm {
  font-size: 18px;
}

.attn-summary-unit {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}

/* 섹션 구분선 제거 (출석 페이지 전용) */
.attn-page .section + .section {
  border-top: none;
}

/* 출석 버튼 */
.attn-checkin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.attn-checkin-btn {
  min-width: 140px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  background: var(--sky-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: -0.3px;
}

.attn-checkin-btn:hover:not(:disabled) {
  background: var(--sky-deep);
}

.attn-checkin-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.attn-checkin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.attn-checkin-done {
  display: inline-block;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 20px;
  letter-spacing: -0.3px;
}

.attn-result-msg {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.attn-result-msg--success { color: var(--sky-deep); }
.attn-result-msg--error   { color: #ef4444; }

/* 달력 */
.attn-month-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.attn-calendar-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.attn-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.attn-week-cell {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 0;
  color: var(--text-mute);
}

.attn-week-cell--sun { color: #ef4444; }
.attn-week-cell--sat { color: #3b82f6; }

.attn-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.attn-day {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 3px 3px;
  min-height: 62px;
  position: relative;
  background: var(--white);
  box-sizing: border-box;
}

.attn-day--empty {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.attn-day--today {
  border-color: var(--sky-dark);
  background: var(--sky-pale);
}

.attn-day--attended {
  background: var(--sky-pale);
}

.attn-day-num {
  font-size: 10px;
  color: var(--text-mute);
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.attn-day--today .attn-day-num {
  color: var(--sky-deep);
  font-weight: 700;
}

/* 도장 — 추후 이미지 교체 시 .attendance-stamp img만 수정 */
.attendance-stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attendance-stamp img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.85;
}

/* 보너스 안내 */
.attn-bonus-subtitle {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 20px;
  text-align: center;
}

.attn-bonus-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}

.attn-bonus-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 80px;
}

.attn-bonus-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-top: 15px;
  transition: background 0.2s;
}

.attn-bonus-line--done {
  background: var(--sky-dark);
}

.attn-bonus-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  transition: all 0.2s;
}

.attn-bonus-step--done .attn-bonus-circle {
  background: var(--sky-dark);
  border-color: var(--sky-dark);
  color: #fff;
}

.attn-bonus-step--current .attn-bonus-circle {
  border-color: var(--sky-dark);
  color: var(--sky-dark);
  box-shadow: 0 0 0 3px var(--sky-light);
}

.attn-bonus-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.attn-bonus-reward {
  font-size: 10px;
  color: var(--text-sub);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.attn-bonus-step--done .attn-bonus-reward {
  color: var(--sky-deep);
}

.attn-bonus-base-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
}

@media (max-width: 767px) {
  .attn-summary-grid {
    max-width: 100%;
    gap: 8px;
  }
  .attn-summary-card { padding: 10px; }
  .attn-summary-value { font-size: 20px; }

  .attn-checkin-btn {
    min-width: 130px;
    padding: 8px 20px;
    font-size: 13px;
  }
  .attn-checkin-done {
    padding: 5px 14px;
    font-size: 12px;
  }

  .attn-calendar-wrap { max-width: 100%; }
  .attn-day {
    min-height: 48px;
    padding: 4px 2px 3px;
    border-radius: 5px;
  }
  .attendance-stamp img {
    width: 34px;
    height: 34px;
  }
  .attn-day-num { font-size: 9px; }

  .attn-bonus-step { width: 60px; }
  .attn-bonus-circle { width: 26px; height: 26px; font-size: 10px; }
  .attn-bonus-reward { font-size: 9px; }
  .attn-bonus-line { margin-top: 13px; }
}

/* ═══════════════════════════════════════
   상점
═══════════════════════════════════════ */

/* 카테고리 박스 */
.shop-cat-box {
  margin-top: 20px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--white);
}

.shop-cat-box + .shop-cat-box {
  margin-top: 16px;
}

.shop-cat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 0;
}

.shop-cat-inner {
  display: flex;
  flex-direction: column;
}

/* 서브카테고리 */
.shop-subcat {
  padding: 16px 0 4px;
}

.shop-subcat--gap {
  padding-top: 20px;
}

.shop-subcat-title {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-deep);
  background: var(--sky-pale);
  border: 1px solid var(--sky-light);
  border-radius: 6px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

/* 빈 서브카테고리 안내 */
.shop-subcat-empty {
  font-size: 12px;
  color: var(--text-mute);
  padding: 4px 0 8px;
}

/* 카테고리 내 그리드 */
.shop-cat-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

/* ── CSS 프레임 프리뷰 ── */
.frame-preview {
  width: 72%;
  height: 72%;
  border-radius: 5px;
  position: relative;
  background: #fff;
}

/* 공오민트: #65D3AC 단색 — frame-preview 내에서만 border 적용 */
.frame-preview.frame-mint            { border: 4px solid #65D3AC; }
.frame-preview.frame-orange          { border: 4px solid #FEB066; }
.frame-preview.frame-simple-sky      { border: 4px solid #8FD3FF; }
.frame-preview.frame-simple-lavender { border: 4px solid #B9A7FF; }
.frame-preview.frame-simple-rose     { border: 4px solid #FF9FBC; }
.frame-preview.frame-simple-lemon    { border: 4px solid #FFD966; }
.frame-preview.frame-simple-lime     { border: 4px solid #A8E66E; }
.frame-preview.frame-simple-gray     { border: 4px solid #BFC7D5; }
.frame-preview.frame-simple-blue     { border: 4px solid #014498; }
.frame-preview.frame-simple-red      { border: 4px solid #B74549; }

/* 상품 상세 모달 */
.shop-detail-card {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.shop-detail-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-mute);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  z-index: 1;
}

.shop-detail-close:hover { color: var(--text); }

.shop-detail-preview {
  width: 100%;
  aspect-ratio: 1;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-preview--lg {
  width: 60%;
  height: 60%;
  border-radius: 8px;
  background: #fff;
}

.shop-detail-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-detail-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.shop-detail-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.shop-detail-credit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mute);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-detail-desc {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.5;
}

.shop-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.shop-detail-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

/* 상태 뱃지 (썸네일 하단) */
.shop-thumb-status {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* 상세 모달 상태 */
.shop-detail-status {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

/* 상태별 색상 */
.shop-status--owned       { color: var(--sky-deep);  }
.shop-detail-status.shop-status--owned   { background: var(--sky-light); color: var(--sky-deep); }

.shop-status--coming      { color: var(--text-mute); }
.shop-detail-status.shop-status--coming  { background: #f1f5f9; color: var(--text-mute); }

.shop-status--available   { color: var(--text-sub);  }

.shop-status--insufficient { color: #ef4444; }
.shop-detail-status.shop-status--insufficient { background: #fef2f2; color: #ef4444; }

/* 상세 모달 구매 버튼 */
.shop-buy-btn-lg {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  background: var(--sky-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.shop-buy-btn-lg:hover { background: var(--sky-deep); }

/* 무료 가격 표시 */
.shop-price-free {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 4px;
  padding: 1px 5px;
}

/* 썸네일 아이템 */
.shop-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 4px;
  transition: background 0.15s;
}

.shop-thumb:hover:not(.shop-thumb--coming):not(.shop-thumb--owned) {
  background: var(--sky-pale);
}

.shop-thumb--owned  { cursor: default; }
.shop-thumb--coming { cursor: default; opacity: 0.6; }

/* 썸네일 이미지 박스 */
.shop-thumb-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 스티커는 contain으로 */
.shop-thumb-img .shop-sticker-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* 상태 뱃지 — 이미지 위 오버레이 */
.shop-thumb-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.shop-badge--owned {
  background: var(--sky-dark);
  color: #fff;
}

.shop-badge--coming {
  background: #334155;
  color: #fff;
}

.shop-badge--right {
  left: auto;
  right: 5px;
}

/* 재화 아이콘 (상점 가격 표시용) */
.shop-currency-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  object-fit: contain;
  vertical-align: middle;
  margin-bottom: 1px;
}

/* 썸네일 텍스트 */
.shop-thumb-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-thumb-price {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-mute);
  white-space: nowrap;
}

.shop-price-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--border);
  border-radius: 2px;
  flex-shrink: 0;
}

/* 모바일 */
@media (max-width: 767px) {
  .shop-cat-box  { padding: 14px; }
  .shop-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .shop-cat-box  { padding: 14px; }
  .shop-thumb-name  { font-size: 10px; }
  .shop-thumb-price { font-size: 9px; }
}

/* ═══════════════════════════════════════
   내 가방
═══════════════════════════════════════ */

/* 착용 프레임 미리보기 섹션 */
.bag-ep-section {
  margin-top: 24px;
  border: 1.5px solid var(--sky-dark);
  border-radius: 14px;
  padding: 20px;
  background: var(--white);
}

.bag-ep-section .bag-section-title {
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 16px;
}

.bag-ep-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ── 합쳐진 미리보기 레이아웃 ── */
.bag-ep-combined {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* 프로필+프레임+스티커 통합 미리보기 박스 */
/* 가방 미리보기 아바타+스티커 grid 컨테이너 (프로필과 동일 구조) */
.bag-ep-preview-outer {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.bag-ep-preview-outer > * {
  grid-area: 1 / 1;
}

.bag-ep-preview-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #f1f5f9;
  overflow: hidden;
}

/* 프레임 — 이미지 위에 overlay */
.bag-ep-preview-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 4px solid transparent;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.bag-ep-preview-wrap.frame-mint::after            { border-color: #65D3AC; }
.bag-ep-preview-wrap.frame-orange::after          { border-color: #FEB066; }
.bag-ep-preview-wrap.frame-simple-sky::after      { border-color: #8FD3FF; }
.bag-ep-preview-wrap.frame-simple-lavender::after { border-color: #B9A7FF; }
.bag-ep-preview-wrap.frame-simple-rose::after     { border-color: #FF9FBC; }
.bag-ep-preview-wrap.frame-simple-lemon::after    { border-color: #FFD966; }
.bag-ep-preview-wrap.frame-simple-lime::after     { border-color: #A8E66E; }
.bag-ep-preview-wrap.frame-simple-gray::after     { border-color: #BFC7D5; }
.bag-ep-preview-wrap.frame-simple-blue::after     { border-color: #014498; }
.bag-ep-preview-wrap.frame-simple-red::after      { border-color: #B74549; }

/* 스티커 오버레이 — 96px 이미지 기준 1.2배 */
.bag-ep-sticker-overlay {
  width: 116px;
  height: 116px;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

/* 3열 레이아웃: 프레임 | 미리보기 | 스티커 */
.bag-ep-tricolumn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.bag-ep-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bag-ep-side--left {
  align-items: flex-end;
  text-align: right;
}

.bag-ep-side--right {
  align-items: flex-start;
  text-align: left;
}

.bag-ep-item-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mute);
  display: block;
}

/* 가방 미리보기 아바타 + 프레임 래퍼 */
.bag-ep-frame-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #f1f5f9;
}

.bag-ep-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 4px solid transparent;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.bag-ep-frame-wrap.frame-mint::after            { border-color: #65D3AC; }
.bag-ep-frame-wrap.frame-orange::after          { border-color: #FEB066; }
.bag-ep-frame-wrap.frame-simple-sky::after      { border-color: #8FD3FF; }
.bag-ep-frame-wrap.frame-simple-lavender::after { border-color: #B9A7FF; }
.bag-ep-frame-wrap.frame-simple-rose::after     { border-color: #FF9FBC; }
.bag-ep-frame-wrap.frame-simple-lemon::after    { border-color: #FFD966; }
.bag-ep-frame-wrap.frame-simple-lime::after     { border-color: #A8E66E; }
.bag-ep-frame-wrap.frame-simple-gray::after     { border-color: #BFC7D5; }
.bag-ep-frame-wrap.frame-simple-blue::after     { border-color: #014498; }
.bag-ep-frame-wrap.frame-simple-red::after      { border-color: #B74549; }

.bag-ep-avatar {
  width: 100%;
  height: 100%;
  background: #e2e8f0 no-repeat center / cover;
}

.bag-ep-inner--gap { margin-top: 16px; }

/* 스티커 미리보기 박스 */
.bag-ep-sticker-box {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.bag-ep-sticker-img {
  width: 120%;
  height: 120%;
  object-fit: contain;
}

.bag-ep-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.bag-ep-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  word-break: keep-all;
}

.bag-ep-none {
  font-size: 13px;
  color: var(--text-mute);
}

.bag-section {
  margin-top: 24px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--white);
}

.bag-section + .bag-section {
  margin-top: 16px;
}

.bag-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 16px;
}

.bag-subsection-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  margin-bottom: 10px;
}

.bag-subsection-gap {
  margin-top: 20px;
}

/* 아이템 그리드 — 상점과 동일 */
.bag-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

/* 아이템 카드 — 상점 shop-thumb과 동일 */
.bag-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 4px;
  transition: background 0.15s;
}

.bag-item-card:hover:not(.bag-item-card--equipped) {
  background: var(--sky-pale);
}

.bag-item-card--equipped {
  background: var(--sky-pale);
}

/* 미리보기 — 상점 shop-thumb-img와 동일 */
.bag-item-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bag-item-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-item-action {
  display: flex;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

/* 착용하기 버튼 (소형) */
.bag-equip-btn-sm {
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  color: var(--sky-dark);
  background: none;
  border: 1.5px solid var(--sky-dark);
  border-radius: 20px;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.bag-equip-btn-sm:hover { background: var(--sky-pale); }
.bag-equip-btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* 착용중 + 해제하기 묶음 */
.bag-equipped-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* 해제하기 버튼 */
.bag-unequip-btn {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  background: none;
  color: var(--text-mute);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.bag-unequip-btn:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
}

.bag-unequip-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 미리보기 반응형: 360px 이하 → 세로 배치 */
@media (max-width: 360px) {
  /* 전체 컬럼 → 세로 방향, 가운데 정렬 */
  .bag-ep-tricolumn {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  /* 미리보기 이미지 최상단 */
  .bag-ep-preview-center {
    order: -1;
  }

  /* 각 정보 묶음: grid로 [라벨 full-width / 이름 + 버튼 한 줄] */
  .bag-ep-side {
    flex: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
  }

  /* 라벨은 두 열 전체 */
  .bag-ep-side .bag-ep-item-label {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  /* 이름은 1열 2행 */
  .bag-ep-side .bag-ep-name {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    font-size: 15px;
  }

  /* 버튼은 2열 2행 */
  .bag-ep-side .bag-unequip-btn {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }

  /* 데스크톱 우정렬 리셋 */
  .bag-ep-side--left {
    align-items: unset;
    text-align: left;
  }

  /* 착용 아이템 없는 빈 side 숨김 */
  .bag-ep-side:empty {
    display: none;
  }
}

/* 착용중 뱃지 */
.bag-equip-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-mute);
  white-space: nowrap;
}

.bag-equip-badge--on {
  background: var(--sky-dark);
  color: #fff;
}

/* 모바일 */
@media (max-width: 767px) {
  .bag-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .bag-section { padding: 14px; }
  .bag-item-name { font-size: 10px; }
}
