:root {
  --bg: #0E1014;
  --card: #161A21;
  --box: #1C212B;
  --border: #222833;
  --text: #E8EAF0;
  --text-sub: #A3ACBB;
  --accent: #C6F24E;
  --up: #FF6B6B;
  --down: #5B8DEF;
  --icon-base: #AAB5C3;
}

* { box-sizing: border-box; }

/* ── 전역 페이지 전환 로딩 표시 ───────────────── */
/* 모든 페이지가 서버 풀리로드라 폼 제출/링크 이동마다 잠깐 멈춰 보이는 걸 막으려고,
   이동이 시작되는 즉시 화면 하단에 폰 알림 배너 같은 작은 토스트를 띄운다.
   "로딩이 끝나는 정확한 시점"은 JS가 알 방법이 없지만(풀페이지 리로드라서), 몰라도
   된다 — 새 페이지가 통째로 그려지면서 이 토스트도 DOM째로 같이 사라지기 때문에
   따로 "종료" 처리를 안 해도 자연히 없어진다. */
.page-loading-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.page-loading-toast.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.page-loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), transparent 80%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: btn-spin 0.8s linear infinite;
}

.btn-loading {
  font-size: 0 !important;
  letter-spacing: 0 !important;
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.8;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* prefers-reduced-motion 비활성화 규칙은 일부러 뺐다 — 이 계정 환경에서 OS/브라우저의
   "동작 줄이기" 설정이 켜져 있어서(2026-11-21 전투 이펙트 때도 같은 증상), 로딩
   스피너의 animation까지 통째로 꺼져 "회전이 전혀 안 보임" 버그로 이어졌었다. */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── 상단바 ───────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: #11141A;
  position: sticky;
  top: 0;
  z-index: 40;
}

/* 전체화면 전환(링크 클릭·폼 제출 후 새 페이지가 뜨는 순간)에 브라우저가 자동으로
   크로스페이드를 넣어준다 — 서버 라우팅 구조는 그대로 두고 "덜컥거리는 느낌"만 줄이는
   선언적 방법(2026-11-24, 버튼 누를 때마다 로딩이 무겁게 느껴진다는 피드백). */
@view-transition {
  navigation: auto;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
}

.topnav-item {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.topnav-item.active {
  background: var(--box);
  color: var(--text);
}

.topnav-item.disabled {
  cursor: default;
  opacity: 0.6;
}

.topnav-divider {
  width: 1px;
  align-self: stretch;
  margin: 6px 6px 6px 2px;
  background: var(--border);
}

.topnav-item-admin {
  color: #FF9F43;
}

.topnav-item-admin:hover { color: #FFB366; }

.topnav-item-admin.active {
  background: rgba(255, 159, 67, 0.15);
  color: #FF9F43;
}

/* ── 왼쪽 사이드바 드로어 ─────────────────────── */
/* 상위 카테고리(공지/파티/게임/상점)를 상단 가로 메뉴 대신 햄버거로 여는
   왼쪽 드로어로 옮겼다 — 홈 이동은 로고 클릭으로 대체(2026-11-23). */

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-toggle:hover { background: var(--box); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 272px;
  max-width: 82vw;
  background: var(--card);
  border-right: 1px solid var(--border);
  z-index: 61;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
}

.sidebar-drawer.active { transform: translateX(0); }

.sidebar-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  border-radius: 8px;
}

.sidebar-close:hover { background: var(--box); color: var(--text); }

.sidebar-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-sub);
}

.sidebar-link .lucide { width: 19px; height: 19px; flex-shrink: 0; color: var(--icon-base, #AAB5C3); }

.sidebar-link:hover { background: var(--box); color: var(--text); }

.sidebar-link.active {
  background: rgba(198, 242, 78, 0.14);
  color: var(--accent);
}

.sidebar-link.active .lucide { color: var(--accent); }

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

.sidebar-link-admin { color: #FF9F43; }
.sidebar-link-admin:hover { background: rgba(255, 159, 67, 0.12); color: #FFB366; }
.sidebar-link-admin.active { background: rgba(255, 159, 67, 0.15); color: #FF9F43; }
.sidebar-link-admin .lucide { color: #FF9F43; }

.notification-wrap {
  position: relative;
  flex-shrink: 0;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 17px;
  text-decoration: none;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  border-radius: 999px;
}

.notification-bell:hover { background: var(--box); }

.notification-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--up);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.notification-unread {
  background: rgba(198, 242, 78, 0.06);
  border-radius: 10px;
}

/* 유튜브 알림함처럼: 종 클릭 → 페이지 이동 없이 최근 알림 몇 개를 드롭다운으로
   보여주고, 맨 아래 "전체보기"를 눌러야 /admin/notifications로 이동한다. */
.notification-dropdown {
  display: none;
  position: fixed;
  width: 340px;
  max-width: calc(100vw - 16px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 50;
  overflow: hidden;
}

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

.notification-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}

.notification-dropdown-mark-all {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  text-decoration: underline;
}

.notification-dropdown-mark-all:hover { color: var(--accent); }
.notification-dropdown-mark-all:disabled { opacity: 0.5; cursor: default; }

.notification-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}

.notification-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.notification-dropdown-item:hover { background: var(--box); }

.notification-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  background: transparent;
}

.notification-dropdown-item.unread .notification-dot { background: var(--accent); }

.notification-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notification-item-title {
  font-size: 13px;
  font-weight: 700;
}

.notification-dropdown-item.unread .notification-item-title { color: var(--text); }
.notification-dropdown-item:not(.unread) .notification-item-title { color: var(--text-sub); font-weight: 600; }

.notification-item-text {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-item-time {
  font-size: 11px;
  color: var(--text-sub);
  opacity: 0.75;
}

.notification-dropdown-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px;
}

.notification-dropdown-footer {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.notification-dropdown-footer:hover { background: var(--box); }

@media (max-width: 480px) {
  .notification-dropdown { width: calc(100vw - 32px); }
}

.soon-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* 상단바 핀 티커 — '일반' 공지나 내전 모집 안내를 세로 슬라이드 루프로 보여주고,
   마우스를 올리면 최대 5개까지 펼쳐본다(2026-11-25). */
/* 상단바 가운데 고정 배치 — 양 옆(로고/알림·프로필) 폭이 서로 달라도 티커 자체는
   화면 중앙에 오도록 flex 흐름에서 빼고 절대 위치로 둔다(2026-11-25, 왼쪽에 붙어
   보인다는 피드백). 모바일에서는 아래 미디어쿼리가 다시 일반 흐름으로 되돌린다. */
.header-ticker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 50vw);
}

.header-ticker-collapsed {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--box);
  border: 1px solid var(--border);
  overflow: hidden;
}

.header-ticker-icon {
  flex-shrink: 0;
  font-size: 13px;
}

.header-ticker-slide-wrap {
  height: 20px;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

.header-ticker-slide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.5s ease;
}

.header-ticker-slide-list li {
  height: 20px;
  line-height: 20px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-ticker-slide-list li a {
  color: var(--text-sub);
  text-decoration: none;
}

.header-ticker-expanded {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  padding: 6px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* 접힌 핀(빨간 영역)과 펼친 목록(파란 영역) 사이 6px 틈에서 마우스가 ".header-ticker"
   밖으로 빠져나가 hover가 끊기던 문제 — 틈을 덮는 투명 다리를 깔아 이어준다(2026-11-25). */
.header-ticker-expanded::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}

.header-ticker:hover .header-ticker-expanded {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-ticker-expanded ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}

.header-ticker-expanded li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
}

.header-ticker-expanded li:hover {
  background: var(--box);
}

.header-ticker-expanded li a {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

.header-ticker-remove-form {
  flex-shrink: 0;
}

.header-ticker-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--text-sub);
  cursor: pointer;
  border-radius: 6px;
}

.header-ticker-remove-btn:hover {
  background: var(--border);
  color: var(--text);
}

.header-ticker-remove-btn .lucide {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .header-ticker {
    position: static;
    transform: none;
    width: auto;
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.nickname {
  font-size: 14px;
  color: var(--text-sub);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 좁은 화면에서는 햄버거+로고와 알림+프로필을 한 줄에 다 담으려고 닉네임 텍스트를
   아예 숨긴다(2026-11-25, 닉네임 때문에 알림/프로필이 두번째 줄로 밀려났다는 피드백).
   아바타+화살표만 남아도 프로필 버튼인 건 충분히 알아볼 수 있다. */
@media (max-width: 440px) {
  .nickname { display: none; }
}

/* ── 프로필 드롭다운(헤더 오른쪽) ─────────────────────── */

.profile-wrap { position: relative; flex-shrink: 0; }

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.profile-trigger:hover { border-color: var(--border); }
.profile-chevron { color: var(--icon-base, #AAB5C3); }

.profile-dropdown {
  display: none;
  position: fixed;
  width: 240px;
  max-width: calc(100vw - 16px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 50;
  overflow: hidden;
  padding: 6px;
}

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

.profile-dropdown-head { padding: 10px 10px 8px; }
.profile-dropdown-name { font-size: 14px; font-weight: 700; }
.profile-dropdown-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

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

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.profile-dropdown-item:hover { background: var(--box); }
.profile-dropdown-item.danger { color: var(--up); }
.profile-dropdown-item .lucide { width: 18px; height: 18px; flex-shrink: 0; }
.profile-dropdown-item:not(.danger) .lucide { color: var(--icon-base, #AAB5C3); }

.badge-sanctioned {
  font-size: 12px;
  color: var(--up);
  border: 1px solid var(--up);
  border-radius: 10px;
  padding: 3px 10px;
  flex-shrink: 0;
}

/* ── 페이지 레이아웃 ───────────────────────── */

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.greeting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.attendance-check-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0E1014;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
}

.attendance-check-btn:hover { background: #D6FF6E; }
.attendance-check-btn .lucide { width: 16px; height: 16px; color: #0E1014; }

/* 보유 포인트 숫자 옆에 나란히 — 포인트 숫자와 세로 중심을 맞추고, 출석 전/후
   버튼 크기·위치가 바뀌지 않게 둘 다 똑같은 고정 크기로 둔다(2026-11-25,
   라벨 옆 작은 버전은 "맘에 안 든다"는 피드백으로 숫자 옆 큰 버전으로 교체). */
.points-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.points-attendance {
  flex-shrink: 0;
}

/* 출석 전(form>button)과 출석 후(span 하나에 두 클래스가 같이 붙음) 구조가 달라서,
   크기는 항상 실제 버튼/배지 자신에게 직접 줘야 한다 — 바깥 .points-attendance에
   크기를 주면 출석 후 case(같은 엘리먼트)에서 이 규칙과 명시도가 충돌해 깨진다. */
.points-attendance .attendance-check-btn,
.points-attendance.attendance-done-badge {
  width: 118px;
  height: 42px;
  justify-content: center;
  padding: 0;
  font-size: 13px;
  border-radius: 10px;
  box-sizing: border-box;
}

@media (max-width: 360px) {
  .points-attendance .attendance-check-btn,
  .points-attendance.attendance-done-badge {
    width: 106px;
    height: 38px;
    font-size: 12px;
  }
}

.attendance-done-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  background: rgba(198, 242, 78, 0.12);
  border: 1px solid rgba(198, 242, 78, 0.35);
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  padding: 9px 16px;
  white-space: nowrap;
}

.attendance-done-badge .lucide { width: 16px; height: 16px; color: var(--accent); }

.greeting-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.greeting-sub {
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}

.col-main, .col-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 14px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.count-badge {
  margin-left: auto;
  font-size: 12px;
  background: var(--box);
  color: var(--text);
  border-radius: 999px;
  padding: 2px 10px;
}

.card-label {
  color: var(--text-sub);
  font-size: 13px;
  margin-bottom: 6px;
}

.empty-text, .stat-empty {
  color: var(--text-sub);
  font-size: 13px;
}

.footnote-text {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

/* ── 포인트 카드 ──────────────────────────── */

.points-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.points-main { width: 100%; }

.points-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--accent);
  line-height: 1.1;
}

.points-unit { font-size: 20px; margin-left: 4px; }

.points-delta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

.points-delta.up { color: var(--up); }
.points-delta.down { color: var(--down); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  align-content: flex-start;
}

.stat-box {
  background: var(--box);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}

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

.stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin-top: 4px;
  white-space: nowrap;
}

.stat-value-sub {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.stat-sub.up { color: var(--up); }
.stat-sub.down { color: var(--down); }

.quicklink-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.quicklink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.quicklink.disabled { opacity: 0.6; }
.equipment-link { margin-top: 12px; }
.quicklink:not(.disabled):hover { border-color: var(--accent); color: var(--accent); }

/* ── 아이콘 그리드 (빠른메뉴 / 모험 액션 / 카지노 게임) ───── */

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin: 18px 0 10px;
}

.section-label .lucide { width: 16px; height: 16px; }

.card > .section-label:first-child { margin-top: 0; }

.icon-grid {
  display: grid;
  gap: 10px;
}

.icon-grid-2 { grid-template-columns: repeat(2, 1fr); }
.icon-grid-3 { grid-template-columns: repeat(3, 1fr); }
.icon-grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) {
  .icon-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.icon-tile:hover { border-color: var(--accent); color: var(--accent); }
.icon-tile-emoji { display: inline-flex; }

/* ── Lucide 아이콘 (라인 아이콘, currentColor 기반) ──────── */
/* 2026-11-23: 이모지(Twemoji)는 아이콘마다 캔버스 안에서 차지하는 비율이 달라
   "낚시 아이콘만 유독 작아 보이는" 문제가 있었다 — Lucide 라인 아이콘은 24x24
   그리드에 맞춰 그려져 있어 어떤 아이콘이든 시각적 크기가 일정하다.
   기본은 부모 color를 상속(= 내비/카드헤더 active 색 전환 그대로 유지)하고,
   아이콘 타일 안에서만 기본색을 무채색으로 고정한다. */
.lucide {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.icon-tile-emoji .lucide { color: var(--icon-base, #AAB5C3); }
.icon-tile:hover .icon-tile-emoji .lucide:not(.lucide-accent) { color: var(--accent); }
.lucide-accent { color: var(--accent); }
.lucide-lock-inline { width: 11px; height: 11px; vertical-align: -1px; }

.emoji-icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.22em;
  display: inline-block;
}
.icon-tile-sub { font-size: 11px; font-weight: 500; color: var(--text-sub); }

.icon-tile.locked,
.icon-tile.done {
  opacity: 0.5;
  cursor: default;
}
.icon-tile.locked:hover,
.icon-tile.done:hover { border-color: var(--border); color: var(--text); }

/* ── 보조 페이지(공지 전체/포인트내역) ───────── */

.page-narrow {
  max-width: 720px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 16px;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.history-main { min-width: 0; }

.history-reason {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-date {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.history-amount {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.history-amount.up { color: var(--up); }
.history-amount.down { color: var(--down); }

/* ── 공지 상세 ─────────────────────────────── */

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
}

.back-link:hover { color: var(--text); }

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

.detail-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.announcement-body {
  font-size: 15px;
  line-height: 1.7;
}

.announcement-body h1,
.announcement-body h2,
.announcement-body h3 {
  margin: 20px 0 10px;
  font-weight: 700;
  line-height: 1.4;
}

.announcement-body h1:first-child,
.announcement-body h2:first-child,
.announcement-body h3:first-child {
  margin-top: 0;
}

.announcement-body h1 { font-size: 20px; }
.announcement-body h2 { font-size: 18px; }
.announcement-body h3 { font-size: 16px; }

.announcement-body p {
  margin: 0 0 10px;
}

.announcement-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.announcement-body li { margin: 4px 0; }

.announcement-body .subtext {
  color: var(--text-sub);
  font-size: 13px;
  margin: 0 0 10px;
}

.announcement-body a { color: var(--accent); }

.announcement-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* 예약모집 갤러리 — 디스코드 포럼 갤러리뷰처럼 썸네일 2열 카드로 보여준다(2026-11-25). */
.reserve-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.reserve-gallery-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--box);
  text-decoration: none;
  color: inherit;
}

.reserve-gallery-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg) center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reserve-gallery-thumb-fallback {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-sub);
}

.reserve-gallery-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
}

.reserve-gallery-body {
  padding: 8px 10px 10px;
}

.reserve-gallery-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.6em;
}

.reserve-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-sub);
}

.reserve-gallery-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.reserve-gallery-comments {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.reserve-gallery-comments .lucide { width: 12px; height: 12px; }

@media (max-width: 360px) {
  .reserve-gallery { grid-template-columns: 1fr; }
}

.announcement-image {
  max-width: 100%;
  border-radius: 12px;
  margin: 10px 0;
  display: block;
}

/* 예약모집 상세 화면의 댓글 목록(2026-11-25) — 디스코드 쓰레드 답글을 그대로 보여준다. */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-row .avatar {
  width: 32px;
  height: 32px;
}

.comment-body {
  flex: 1 1 auto;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

a.comment-author:hover { text-decoration: underline; }
.comment-row a:has(.avatar) { display: block; flex-shrink: 0; }

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

.comment-text {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
  margin-top: 2px;
}

.comment-text p { margin: 0 0 6px; }
.comment-text p:last-child { margin-bottom: 0; }

/* 공지/예약모집 본문·댓글 안의 @멘션 — 눌러서 그 사람 웹 프로필로 이동(2026-11-25). */
.mention-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

/* ── 프로필 / 배너 ────────────────────────── */

.banner {
  background: var(--box);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.banner.success {
  border-color: var(--accent);
  color: var(--accent);
}

/* 배너를 하단 토스트 팝업으로 바꾼다 — base.html의 전역 스크립트가 페이지에 뜬
   .banner를 찾으면 자동으로 이 클래스를 붙인다(2026-11-24, 사용자 요청). */
.banner.toast-mode {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translate(-50%, 0);
  z-index: 300;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: banner-toast-in 0.2s ease both;
}

.banner.toast-mode.leaving {
  animation: banner-toast-out 0.25s ease both;
}

@keyframes banner-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes banner-toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, 12px); }
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-sub);
}

.section-title .lucide { width: 16px; height: 16px; }

.section-subtitle {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-sub);
  opacity: 0.8;
}

.profile-card { margin-bottom: 4px; }

.profile-card.has-bg {
  background-size: cover;
  background-position: center;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.profile-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.shop-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.item-thumb {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--box);
}

.profile-head-info { min-width: 0; }

.profile-name {
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-title {
  font-size: 13px;
  color: var(--accent);
  margin-top: 2px;
}

.profile-badges {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-pill {
  font-size: 12px;
  background: var(--box);
  border-radius: 999px;
  padding: 3px 10px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
}

/* ── 전적(게임 연동 계정) ─────────────────────────────── */

.stats-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--box);
}

.stats-rank {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  background: var(--box);
  border-radius: 10px;
}

.stats-tier {
  font-weight: 700;
  font-size: 15px;
}

.stats-lp {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  color: var(--down);
}

.stats-wl {
  font-size: 12.5px;
  color: var(--text-sub);
}

.stats-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-match {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--box);
  border-left: 3px solid var(--border);
  font-size: 12.5px;
}

.stats-match.win { border-left-color: var(--down); }
.stats-match.lose { border-left-color: var(--up); }

.stats-match-result { font-weight: 700; flex-shrink: 0; width: 18px; }
.stats-match.win .stats-match-result { color: var(--down); }
.stats-match.lose .stats-match-result { color: var(--up); }

.stats-match-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-sub);
}

.stats-match-time {
  flex-shrink: 0;
  color: var(--text-sub);
  font-size: 11px;
}

.stats-pubg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-pubg-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 12px;
  background: var(--box);
  border-radius: 10px;
}

.stats-pubg-mode {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}

.profile-stat-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-top: 2px;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

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

.event-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--box);
}

.item-label {
  font-size: 14px;
  font-weight: 500;
}

.item-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.item-sub.lock { color: var(--text-sub); }

.item-btn {
  flex-shrink: 0;
  min-height: 40px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.item-btn:hover { border-color: var(--accent); color: var(--accent); }
.item-btn.active { color: var(--accent); border-color: var(--accent); }
.item-btn.disabled { opacity: 0.5; cursor: default; background: none; }
.item-btn.disabled:hover { border-color: var(--border); color: var(--text); }
.item-btn.danger { color: var(--up); border-color: var(--up); }

.pin-toggle-btn.active { color: var(--accent); border-color: var(--accent); }

.announce-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.announce-color-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  margin-left: auto;
}

.announce-color-input {
  width: 36px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.item-btn.danger:hover { background: var(--up); color: var(--bg); }

.equipment-row { flex-wrap: wrap; }

.equipment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gift-details { position: relative; }
.gift-details summary { list-style: none; }
.gift-details summary::-webkit-details-marker { display: none; }

.gift-form {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  display: flex;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.block-editor-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--box);
}

.block-editor-new { border-style: dashed; }

/* on/off 슬라이드 토글 — 빠른 필터 편집에서 체크박스 "삭제" 대신 쓴다(2026-11-25).
   켜짐 = 유지, 꺼짐 = 저장 시 제거. */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.toggle-switch-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.toggle-switch-track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.toggle-switch input:checked + .toggle-switch-track {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-switch-track::before {
  transform: translateX(18px);
}

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

.block-editor-kind {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.block-editor-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gift-target-input {
  width: 160px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

/* ── 주식 ─────────────────────────────────── */

.stock-summary {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stock-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 10px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.stock-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.stock-tab.active { color: var(--accent); border-color: var(--accent); }

.tier-details { margin-bottom: 12px; }
.tier-details .card { margin-top: 8px; }

.tier-summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-summary::-webkit-details-marker { display: none; }
.tier-summary::before {
  content: "▸";
  font-size: 12px;
  color: var(--text-sub);
  transition: transform 0.15s;
}
.tier-details[open] .tier-summary::before { transform: rotate(90deg); }

.tier-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  opacity: 0.7;
}

.held-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}

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

.stock-link:hover { color: var(--accent); }

.rank-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--bg);
  margin-right: 4px;
}

.rank-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 22px;
  margin-right: 0;
}

.stock-price-col {
  flex-shrink: 0;
  text-align: right;
  margin-right: 12px;
}

.stock-price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.stock-change {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.stock-change.up { color: var(--up); }
.stock-change.down { color: var(--down); }

.favorite-form { flex-shrink: 0; }

.favorite-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--box);
  color: var(--text-sub);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn.active { color: var(--up); border-color: var(--up); }
.favorite-btn.large { width: 44px; height: 44px; font-size: 20px; }

.stock-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 20px;
}

.stock-detail-title { flex: 1; min-width: 0; }
.stock-detail-title .page-title { margin: 0; }

.stock-price-block { margin-bottom: 20px; }

.stock-price-big {
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
  font-weight: 700;
}

.stock-change-row {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.stock-change-row .stock-change { font-size: 13px; }

.chart-card { padding: 16px; }

.stock-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.flow-card { margin-top: 16px; }

.flow-top-buyer {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.trade-card { margin-top: 16px; }

.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.trade-row:not(:last-child) { border-bottom: 1px solid var(--border); }

.news-feed { list-style: none; margin: 0; padding: 0; }

.news-feed-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.news-feed-date {
  flex-shrink: 0;
  color: var(--text-sub);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
}

.trade-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.job-active {
  margin-bottom: 14px;
}

/* ── 전투 ─────────────────────────────────── */

.battle-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.battle-arena {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 14px 18px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(198, 242, 78, .09), transparent 68%),
    linear-gradient(180deg, #171c14 0%, var(--box) 46%, var(--card) 100%);
  border: 1px solid var(--border);
}

.battle-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.battle-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.battle-ground-shadow {
  width: 58%;
  height: 11px;
  margin-top: 2px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.45), transparent 72%);
}

.battle-info-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.battle-stat-plate {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  /* 닉네임 길이·장비/특성 줄 수가 플레이어·몬스터 카드마다 달라서 HP바 위치가
     들쭉날쭉하던 문제 — 카드를 세로 flex로 만들고 HP 영역을 margin-top:auto로
     바닥에 붙여서, 위쪽 내용이 몇 줄이든 두 카드의 HP바가 항상 같은 높이에 오게
     한다(2026-11-25). .battle-info-row의 align-items:stretch로 두 카드 높이가
     이미 같아지므로 이 방식이 성립한다. */
  display: flex;
  flex-direction: column;
}

.battle-stat-plate .item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hp-area {
  margin-top: auto;
}

/* 스펙 요청: HP 수치를 체력바 바로 "위"에 둔다 — 공용 .hp-text는 보통 바 아래
   쓰이는 용도라(margin-top) 여기서만 순서를 뒤집는다. */
.battle-hp-area .hp-text {
  margin-top: 0;
  margin-bottom: 6px;
}

.battle-stat-plate .trait-row {
  max-height: 40px;
  overflow: hidden;
}

.battle-vs {
  position: absolute;
  left: 50%;
  bottom: 61px;
  transform: translateX(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  opacity: 0.55;
  pointer-events: none;
}

.battle-monster-img, .battle-player-img {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  image-rendering: pixelated;
  background: var(--bg);
  border-radius: 10px;
  object-fit: cover;
}

.battle-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.trait-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 4px 0;
}

.trait-chip {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.bar-track.unknown .bar-fill {
  opacity: 0.3;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.35) 6px 12px);
}

.battle-stat-plate .item-label { margin-bottom: 2px; }
.battle-stat-plate .item-sub { margin-bottom: 2px; }
.battle-stat-plate .trait-row { margin: 4px 0 6px; }

@media (max-width: 480px) {
  .battle-arena { gap: 10px; padding: 18px 8px 14px; }
  .battle-stage { gap: 6px; }
  .battle-monster-img, .battle-player-img { width: 72px; height: 72px; }
  .battle-vs { font-size: 16px; bottom: 49px; }
  .battle-stat-plate { padding: 7px 6px; }
  .battle-stat-plate .trait-chip { font-size: 9.5px; padding: 1px 5px; }
}

.bar-fill.down { background: var(--up); }

.battle-log {
  background: var(--box);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.battle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* "다른 상대 찾기"는 공격/도망과 분리해서 그 아래 한 줄 전체폭으로(사용자 제공
   예시 이미지대로)(2026-11-26). */
.battle-actions-secondary {
  margin-top: 10px;
}
.battle-actions-secondary form { width: 100%; }
.battle-actions-secondary .battle-btn { width: 100%; }
.battle-search-count {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
}

.battle-btn {
  min-height: 48px;
  flex: 1 1 auto;
  font-size: 14px;
  background: var(--box);
  color: var(--text);
  border: none;
  font-weight: 700;
}

/* 공격만 라임으로 강조하고 나머지(도망/다른 상대)는 중립색 — "공격만 라임색이면
   될거같다"는 피드백으로 단순화(2026-11-26). */
.battle-btn.primary { background: var(--accent); color: #0E1014; }

.battle-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.battle-items form { width: 100%; }
.battle-items .item-btn { width: 100%; }

.battle-done-link {
  display: inline-flex;
  width: auto;
  align-self: flex-start;
}

.trade-qty {
  width: 64px;
  min-height: 40px;
  background: var(--box);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: center;
}

.party-game-select {
  width: auto;
  max-width: 100%;
  min-width: 140px;
  padding: 0 10px;
  text-align: left;
  text-overflow: ellipsis;
}

.trade-total {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  font-family: "Space Grotesk", sans-serif;
}

/* ── 파티 모집 ────────────────────────────── */

.recruit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recruit-item {
  background: var(--box);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.recruit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.recruit-tag-img {
  overflow: hidden;
  padding: 0;
}

.recruit-tag-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recruit-tag {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #1D232D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.recruit-info {
  flex: 1 1 auto;
  min-width: 0;
}

.recruit-game-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.recruit-game {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.recruit-status-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #58DFA0;
  background: #163326;
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}

.recruit-meta {
  color: var(--text-sub);
  font-size: 12px;
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recruit-desc {
  font-size: 12px;
  color: var(--text);
  margin: 11px 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recruit-count-badge {
  flex-shrink: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(198, 242, 78, 0.1);
  border-radius: 999px;
  padding: 3px 11px;
}

.recruit-count-wrap {
  flex-shrink: 0;
  flex: 0 0 65px;
  text-align: right;
}

.recruit-count-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.recruit-count-label {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 3px;
}

.recruit-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recruit-progress .bar-track {
  height: 6px;
  background: #303743;
  border-radius: 999px;
}

.join-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #384C2D;
  background: #222F1F;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.join-link:hover, .join-link:focus-visible { background: #2C4025; border-color: var(--accent); }

.join-link.disabled {
  pointer-events: none;
  color: var(--text-sub);
  border-color: var(--border);
  background: var(--box);
}

@media (max-width: 560px) {
  .recruit-item { padding: 12px; }
  .recruit-head { gap: 9px; }
  .recruit-tag { width: 36px; height: 36px; }
  .recruit-count-wrap { flex-basis: 52px; }
  .recruit-count-value { font-size: 16px; }
  .recruit-game { font-size: 14px; }
}

/* ── 공통 바(게이지) ──────────────────────── */

.bar-track {
  height: 8px;
  border-radius: 8px;
  background: var(--border);
  overflow: hidden;
  width: 100%;
}

/* ── 업적 카드 ─────────────────────────────── */

.achv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achv-card {
  background: #161A21;
  border: 1px solid #29303B;
  border-radius: 12px;
  padding: 16px;
}

.achv-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achv-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.achv-main {
  flex: 1 1 auto;
  min-width: 0;
}

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

.achv-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achv-tier-chip {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--box);
  color: var(--text-sub);
  white-space: nowrap;
}

.achv-tier-chip.tier-bronze { background: rgba(201, 123, 61, 0.18); color: #D98A4A; }
.achv-tier-chip.tier-silver { background: rgba(184, 192, 204, 0.2); color: #C7CFDA; }
.achv-tier-chip.tier-gold   { background: rgba(232, 185, 35, 0.18); color: #E8B923; }
.achv-tier-chip.tier-diamond { background: rgba(111, 227, 232, 0.18); color: #6FE3E8; }

.achv-progress {
  margin-top: 12px;
}

.achv-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.achv-progress-row .achv-num { font-variant-numeric: tabular-nums; }

@media (max-width: 420px) {
  .achv-icon { width: 38px; height: 38px; font-size: 18px; }
  .achv-name { font-size: 14px; }
}

.bar-track.small {
  height: 6px;
  width: 80px;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

/* ── 모험 메인 화면 (캐릭터 상태 + 기능 카드) ─────────── */

.adv-status-card { display: flex; flex-direction: column; }

.adv-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.adv-status-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.adv-status-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.adv-status-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-status-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.adv-status-level {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.adv-status-equip {
  font-size: 13px;
  color: var(--text-sub);
}

.adv-hp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.adv-hp-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.adv-active-job { background: var(--box); }

.card-link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.card-link-row:hover { border-color: var(--accent); }

.card-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--box);
}

.card-link-icon .lucide { color: var(--icon-base, #AAB5C3); }

.card-link-chevron { flex-shrink: 0; }
.card-link-chevron .lucide { color: var(--icon-base, #AAB5C3); }
.card-link-row:hover .card-link-chevron .lucide { color: var(--accent); }

/* ── 모험 카드(구) ────────────────────────────── */

.adventure-level {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 10px;
}

.hp-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.equipment-text {
  margin-top: 10px;
  font-size: 13px;
}

.battle-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── 랭킹 ─────────────────────────────────── */

.my-rank {
  font-size: 14px;
  margin-bottom: 12px;
}

.my-rank strong {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
}

.leaderboard-list li.me {
  background: var(--box);
}

.leaderboard-list li.has-bg {
  background-size: cover;
  background-position: center;
  padding: 8px;
}

.rank-no {
  width: 20px;
  color: var(--text-sub);
  font-family: "Space Grotesk", sans-serif;
  flex-shrink: 0;
}

.rank-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rank-profile-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rank-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.rank-link:hover .rank-name { color: var(--accent); }

.rank-points {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.rank-points.down { color: var(--up); }

/* ── 공지 ─────────────────────────────────── */

.announcement-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.announcement-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.announcement-list li:last-child { border-bottom: none; }

.announcement-list a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 10px 0;
  min-width: 0;
  flex: 1;
}

.announcement-list a:hover .announcement-title { color: var(--accent); }

/* 관리자 전용 핀 버튼 — 목록 줄 오른쪽 끝에 작게(2026-11-25). */
.announcement-pin-form {
  flex-shrink: 0;
}

.announcement-pin-form .item-btn {
  font-size: 11px;
  padding: 5px 9px;
  white-space: nowrap;
}

.announcement-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tag-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  background: var(--box);
  color: var(--text-sub);
  border-radius: 6px;
  padding: 1px 8px;
}

.announcement-title {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.announcement-date {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 3px;
}

/* 공지 상세 화면 안의 관리자 전용 핀/수정/삭제 버튼 줄(2026-11-25). */
.announcement-admin-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* 공지 목록 위 탭 줄 + "글쓰기" 버튼을 한 줄에 양 끝 정렬(2026-11-25). */
.announcements-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.announcements-tabs-row .stock-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.announcements-write-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  margin: 24px 0 10px;
}

/* ── 로그인 화면 ──────────────────────────── */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.login-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 8px;
}

.login-sub {
  color: var(--text-sub);
  font-size: 14px;
  margin: 0 0 24px;
}

.login-error {
  color: var(--up);
  font-size: 13px;
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  background: var(--accent);
  color: #0E1014;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 0 20px;
}

/* ── 상점 허브 ─────────────────────────────── */

.shop-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin: 8px 0 24px;
}

.shop-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 0 12px;
  cursor: pointer;
}

.shop-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.shop-tab .lucide { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }

/* 알약(pill) 모양 탭 — 주식 종목 필터 칩과 같은 스타일을 다른 탭 묶음(전적 등)에도 쓸 때. */
.shop-tabs.pill-tabs {
  gap: 8px;
  border-bottom: none;
  margin: 0 0 14px;
}

.shop-tab.pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--box);
  flex-shrink: 0;
  white-space: nowrap;
}

/* 칩이 많아져도 두 줄로 안 꺾이고, 마우스 드래그나 터치로 양옆으로 밀어서
   볼 수 있게 한다(2026-11-25). */
.party-filter-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.party-filter-scroll::-webkit-scrollbar { display: none; }
.party-filter-scroll.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }

.party-filter-edit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-sub);
  text-decoration: none;
}

.party-filter-edit-btn:hover { background: var(--box); color: var(--text); }
.party-filter-edit-btn .lucide { width: 18px; height: 18px; }

.shop-tab.pill.active {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.shop-panel + .shop-panel { margin-top: 0; }

.rank-period-tabs { gap: 16px; margin: 10px 0 12px; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.shop-card-media {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
}

.shop-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
}

.shop-card-placeholder.neutral { background: var(--box); color: var(--text-sub); }

.shop-card-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card-price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.shop-card-discount {
  margin-left: 6px;
  color: var(--accent);
}

.shop-cosmetic-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin: 20px 0 10px;
}

.shop-cosmetic-group-title:first-child { margin-top: 0; }

.shop-card-cosmetic { text-decoration: none; }

.shop-card-price.owned { color: var(--accent); }

.shop-card-action {
  margin: 0;
}

.shop-card-action .item-btn,
a.shop-card-action.item-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.shop-more-link {
  display: inline-block;
  color: var(--text-sub);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 32px;
}

.shop-more-link:hover { color: var(--accent); }

/* ── 카지노 ─────────────────────────────── */

.slot-reel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 16px;
  background: radial-gradient(ellipse at center, rgba(198, 242, 78, 0.1) 0%, transparent 72%), var(--card);
}

.slot-machine {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin-inline: auto;
  container-type: inline-size;
}

/* 2026-11-26: 보유 포인트/현재 베팅/오늘 이용을 가운데 빈 패널로, 배팅 버튼을 맨
   아래 패널 안으로 옮긴다 — 포커/블랙잭과 같은 "이미지 위 좌표 배치" 방식. 두 패널
   경계는 새 배경 이미지(28_slot_machine_frame_v3.png)를 직접 재서 구했다. */
.slot-zone-stats {
  position: absolute;
  top: 65%; height: 13%; left: 8%; right: 8%;
  display: flex; align-items: center; justify-content: center;
}
/* 2026-11-26: 베팅 선택 줄 + 스핀 버튼을 동시에 쌓으면(2줄) 패널 아래로 삐져나가서
   (실기기 신고), 같은 한 줄 자리에서 베팅 선택 → 스핀 버튼으로 "교체"되게 바꿨다.
   패널 영역(82.6~94.4%)은 그대로 두되, 내용은 항상 한 줄만 채운다. */
.slot-zone-actions {
  position: absolute;
  top: 82.6%; height: 11.8%; left: 5%; right: 5%;
  display: flex; align-items: center; justify-content: center;
}
.slot-bet-swap { position: relative; width: 100%; }
.slot-bet-swap .slot-bet-form {
  margin: 0; width: 100%; gap: 0.8cqw;
  display: flex;
}
.slot-bet-swap .slot-spin-btn { display: none; }
.slot-bet-swap.bet-chosen .slot-bet-form { display: none; }
.slot-bet-swap.bet-chosen .slot-spin-btn { display: block; }
.slot-bet-pill {
  min-height: 44px;
  box-sizing: border-box;
  font-size: clamp(9px, 2.2cqw, 12px);
  padding: 0 2px;
  flex: 1 1 18%;
  background: var(--box);
  color: var(--text);
  border: 1px solid var(--border);
}
.slot-spin-btn {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  font-size: clamp(12px, 2.8cqw, 15px);
  font-weight: 700;
  background: var(--accent);
  color: #0E1014;
  border: none;
}
/* 베팅 핀 자리에서 스핀 버튼으로 교체되다보니, 마우스가 그 자리에 그대로 올라가 있는
   상태(:hover)가 되기 쉬운데, 공용 .item-btn:hover 규칙이 글자색을 라임으로 바꿔서
   라임 배경 위에 글자가 안 보이는 버그가 있었다 — 명시적으로 되돌린다. */
.slot-spin-btn:hover { color: #0E1014; }

.slot-machine-frame {
  width: 100%;
  height: auto;
  display: block;
}

/* 2026-11-26: 새 배경(28_slot_machine_frame_v3.png) 실측 좌표로 교체 — 이전 값은
   구버전 이미지 기준이라 창 높이가 실제보다 거의 2배 커서, 기호가 진짜 창 밖
   아래쪽에 따로 떠보이던 버그가 있었다. */
.slot-window {
  position: absolute;
  top: 26.3%;
  height: 18%;
  width: 20%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.slot-window img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.slot-window-1 { left: 17.8%; }
.slot-window-2 { left: 41%; }
.slot-window-3 { left: 64%; }

.slot-reel-pop { animation: slot-pop 0.3s ease-out; }

@keyframes slot-pop {
  0% { transform: scale(0.9); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.slot-result-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  text-align: center;
}

.slot-result-text.up { color: var(--up); }
.slot-result-text.down { color: var(--down); }

/* 릴이 멈추기 전엔 결과 문구를 숨겨뒀다가(스핀 중엔 안 보여야 자연스러움), 다 멈춘
   뒤에 페이드인 — "스핀이 거의 안 보이고 결과도 안 나온다"는 피드백(2026-11-26)에
   맞춰 릴 회전 시간을 늘린 것과 짝을 이루는 연출. */
.slot-result-text.slot-result-pending { opacity: 0; transform: translateY(6px); }
.slot-result-text.slot-result-revealed {
  opacity: 1; transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease;
}

.slot-bet-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.roulette-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 107, 0.08) 0%, transparent 72%), var(--card);
}

.roulette-revolver-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.roulette-chambers {
  display: flex;
  gap: 8px;
}

.roulette-chamber {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--box);
  border: 1px solid var(--border);
}

.roulette-chamber.survived { background: var(--accent); border-color: var(--accent); }

.roulette-stat-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-sub);
}

.roulette-payout {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.roulette-message {
  font-size: 13px;
  text-align: center;
  color: var(--text-sub);
  white-space: pre-line;
}

.roulette-message.danger { color: var(--up); }
.roulette-message.success { color: var(--accent); }

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

/* 색 채우기는 body.casino-page 공용 규칙(.item-btn.danger/.primary-lime)에서
   처리하고, 여기선 레이아웃(동일폭/높이)만 담당한다. */
.roulette-actions .item-btn {
  flex: 1 1 0;
  min-height: 44px;
  font-weight: 700;
}

/* ── 블랙잭/포커: 실제 테이블 그림 위에 카드·버튼을 좌표로 얹는 구조 ───────────
   슬롯머신 프레임과 같은 발상 — 테이블 이미지를 그대로 보여주고(너비 100%, 세로는
   이미지 비율을 그대로 따라감), 딜러/플레이어 카드·배팅정보·버튼은 이미지 위의
   정해진 구역(.table-zone)에 퍼센트 좌표로 얹는다. */
.table-frame {
  position: relative;
  width: 100%;
}

.table-frame-bg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.table-zone {
  position: absolute;
  left: 10%;
  right: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.table-zone-bj-dealer { top: 8%; height: 20%; }
.table-zone-bj-player { top: 32%; height: 25%; }
.table-zone-bj-info { top: 61%; height: 15%; justify-content: flex-start; gap: 6px; }
.table-zone-bj-actions { top: 80%; height: 14%; left: 8%; right: 8%; }

.table-zone .blackjack-hand-label,
.table-zone .item-sub { font-size: 11px; }

.table-zone .card-row { justify-content: center; flex-wrap: nowrap; gap: 5px; }
.table-zone .playing-card { width: 38px; height: 53px; }
.table-zone .playing-card.small { width: 28px; height: 40px; }

.blackjack-hand { display: flex; flex-direction: column; gap: 8px; align-items: center; }

.blackjack-hand-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.card-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.playing-card {
  width: 46px;
  height: 64px;
  border-radius: 8px;
  flex-shrink: 0;
  perspective: 500px;
}

.playing-card.back {
  background: repeating-linear-gradient(135deg, var(--box), var(--box) 4px, var(--border) 4px, var(--border) 8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.playing-card.small { width: 34px; height: 48px; }

/* 실물 카드처럼 뒷면→앞면으로 뒤집히는 구조 — .card-face 두 장을 3D로 겹쳐두고
   .card-flip-inner를 통째로 회전시켜서 "딜링 모션"을 연출한다(2026-11-24). */
.card-flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.card-face.card-front { background: #F0EDE4; color: #1C212B; }
.playing-card.red .card-face.card-front { color: #C1403D; }

.card-face.card-back {
  background: repeating-linear-gradient(135deg, var(--box), var(--box) 4px, var(--border) 4px, var(--border) 8px);
  transform: rotateY(180deg);
}

.card-face .card-rank { font-size: 16px; line-height: 1.1; }
.card-face .card-suit { font-size: 14px; }
.playing-card.small .card-face .card-rank { font-size: 13px; }
.playing-card.small .card-face .card-suit { font-size: 11px; }

.poker-npc-portrait {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: block;
  margin-bottom: 2px;
}

.treasure-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 16px;
  position: relative;
}

.treasure-vs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.treasure-side.right { text-align: right; }

.treasure-turn-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--box);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.treasure-turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-sub);
  flex-shrink: 0;
}

.treasure-turn-pill.mine {
  background: rgba(198, 242, 78, 0.14);
  color: var(--accent);
}

.treasure-turn-pill.mine .treasure-turn-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(198, 242, 78, 0.7);
}

/* 보물찾기 판 전용 프레임 — 양피지 지도 이미지를 정사각형으로 깔고 그 위에 9칸
   그리드를 올린다(2026-11-24, 사용자가 보내준 참고 이미지 기준). */
.treasure-board-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background-image: url("/static/casino/29_treasure_map_v2.webp");
  background-size: cover;
  background-position: center;
  padding: 13% 7% 7% 7%;
}

.treasure-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
}

.treasure-board form { display: contents; }

.treasure-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(22, 26, 33, 0.82);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  width: 100%;
}

button.treasure-cell {
  cursor: pointer;
  font-family: inherit;
}

button.treasure-cell:hover { border-color: var(--accent); color: var(--accent); }

button.treasure-cell.selected {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(198, 242, 78, 0.35), 0 0 14px rgba(198, 242, 78, 0.4);
}

.treasure-cell.opened {
  background: rgba(22, 26, 33, 0.85);
  font-size: 22px;
}

.treasure-confirm-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.treasure-confirm-row .item-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.treasure-cell-icon {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.treasure-invite-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.treasure-bet-select {
  width: auto;
  min-height: 40px;
  padding: 0 10px;
}

/* ── 카지노 연출(스핀·카드딜·쉐이크) ───────────── */
/* 전투 화면(battle-fx)과 같은 발상: 서버는 결과가 확정된 풀 페이지를 그대로 내려주지만,
   화면에서는 "지금 막 벌어진 일"처럼 보이게 CSS 애니메이션 + 합성음을 얹는다.
   fresh_action일 때만 재생되고(새로고침 시 재생 안 함) — prefers-reduced-motion 비활성화는
   일부러 안 넣었다(아래 별도 주석 참고, 이 환경에서 그 설정이 켜져 있어 전부 안 보이게 됨). */

.slot-reel-strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  will-change: transform;
}

.slot-reel-strip img {
  width: 72%;
  margin: 0 auto;
  flex-shrink: 0;
  object-fit: contain;
}

.slot-reel-strip.spinning {
  transition: transform var(--spin-duration, 1s) cubic-bezier(.12, .78, .18, 1);
}

.slot-machine.win-flash { animation: casino-win-glow 1.1s ease-out 0.2s both; }

@keyframes casino-win-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(198, 242, 78, 0)); }
  35%, 65% { filter: drop-shadow(0 0 18px rgba(198, 242, 78, .85)); }
}

.roulette-card.fx-recoil .roulette-revolver-img { animation: casino-recoil .32s ease both; }

.roulette-card.fx-death { animation: casino-shake .5s ease both; }
.roulette-card.fx-death::after,
.roulette-card.fx-survive::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: casino-flash-red .55s ease-out both;
}
.roulette-card.fx-survive::after { animation-name: casino-flash-green; }
.roulette-card { position: relative; overflow: hidden; }

.roulette-chamber.fx-pop { animation: casino-chamber-pop .4s cubic-bezier(.2,.8,.2,1) both; }

@keyframes casino-recoil {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-14px) rotate(-5deg); }
  100% { transform: translateX(0) rotate(0); }
}

@keyframes casino-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-9px); }
  40%, 60% { transform: translateX(9px); }
}

@keyframes casino-flash-red { 0% { background: rgba(255, 107, 107, .38); } 100% { background: rgba(255, 107, 107, 0); } }
@keyframes casino-flash-green { 0% { background: rgba(198, 242, 78, .3); } 100% { background: rgba(198, 242, 78, 0); } }

@keyframes casino-chamber-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* 딜링 모션: 카드가 덱 자리(좌상단)에서 날아와 제자리에서 뒤집히며 앞면을 보여준다.
   애니메이션은 바깥 박스(.playing-card)가 아니라 안쪽 회전판(.card-flip-inner)에 걸어야
   뒤집기(preserve-3d)와 이동이 같이 자연스럽게 합성된다. */
.card-row.fx-deal .playing-card .card-flip-inner {
  animation: casino-card-deal-flip .52s cubic-bezier(.3,.7,.2,1) both;
}

.card-row.fx-deal .playing-card:nth-child(1) .card-flip-inner { animation-delay: 0ms; }
.card-row.fx-deal .playing-card:nth-child(2) .card-flip-inner { animation-delay: 110ms; }
.card-row.fx-deal .playing-card:nth-child(3) .card-flip-inner { animation-delay: 220ms; }
.card-row.fx-deal .playing-card:nth-child(4) .card-flip-inner { animation-delay: 330ms; }
.card-row.fx-deal .playing-card:nth-child(5) .card-flip-inner { animation-delay: 440ms; }
.card-row.fx-deal .playing-card:nth-child(6) .card-flip-inner { animation-delay: 550ms; }
.card-row.fx-deal .playing-card:nth-child(7) .card-flip-inner { animation-delay: 660ms; }

@keyframes casino-card-deal-flip {
  0%   { transform: translate(-58px, -36px) rotateY(180deg) scale(.8); opacity: 0; }
  40%  { opacity: 1; }
  65%  { transform: translate(0, 0) rotateY(90deg) scale(1.04); }
  100% { transform: translate(0, 0) rotateY(0deg) scale(1); }
}

/* 포커 배팅 금액 팝 — 체크/배팅/폴드 등 액션 직후 판돈 표시가 짤막하게 튀어오른다. */
.poker-pot-pop { animation: casino-pot-pop .45s cubic-bezier(.2,.8,.2,1) both; }

@keyframes casino-pot-pop {
  0% { transform: scale(1.3); color: var(--accent); }
  100% { transform: scale(1); }
}

.treasure-cell.fx-reveal { animation: casino-cell-reveal .4s cubic-bezier(.2,.8,.2,1) both; }
.treasure-cell.fx-reveal.trap { animation: casino-cell-reveal .4s cubic-bezier(.2,.8,.2,1) both, casino-shake .5s ease .35s both; }

@keyframes casino-cell-reveal {
  0% { transform: scale(1) rotateY(0deg); }
  50% { transform: scale(1.08) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0deg); }
}

/* prefers-reduced-motion 비활성화 규칙을 일부러 안 넣었다 — 위 전역 주석과 같은 이유
   (2026-11-21 전투 이펙트, 2026-11-24 카지노 연출 둘 다 이 계정 환경에서 "동작 줄이기"가
   켜져 있어 애니메이션이 통째로 안 보이는 버그로 이어졌다). */

/* ── 하단 탭바 — 전부 제거(2026-11-26, 카지노에만 적용돼 있던 걸 전체로 확대) ── */

.bottomnav {
  display: none !important;
}

/* 카지노 전 화면 공통 버튼 톤 — 테두리만 있던 걸 배경색 채우기로(2026-11-26).
   .danger/.primary-lime를 어느 카지노 페이지에서 써도 같은 룩이 나오게 한 곳에
   모아둔다(룰렛/보물찾기처럼 .table-frame이 없는 일반 카드형 화면용). */
body.casino-page .item-btn.danger {
  background: var(--up);
  color: #fff;
  border: none;
}
body.casino-page .item-btn.primary-lime {
  background: var(--accent);
  color: #0E1014;
  border: none;
}

/* ── 모바일 ───────────────────────────────── */

@media (max-width: 640px) {
  .page { padding: 16px 16px 24px; }

  .layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .topnav { display: none; }

  .points-top { gap: 16px; }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .nickname { max-width: 80px; }
}

/* ── 전투 FX (battle-fx) ─────────────────────────────────── */
/* 번갈아치기 연출: 서버가 한 번에 "내 공격 결과 + 몬스터 반격 결과"를 같이 내려주지만,
   fx-wait-1(내 공격 → 몬스터가 맞는 연출)과 fx-wait-2(몬스터 반격 → 내가 맞는 연출)로
   나눠서 애니메이션을 처음부터 일시정지시켜두고, battle-fx.js가 0ms/550ms에 각각
   클래스를 떼어내 순서대로 재생되게 한다 (2026-11-21). */
.battle-fx-card{position:relative;isolation:isolate;overflow:visible;transform-origin:center center}
.battle-fx-card::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:5;opacity:0}
.battle-fx-card.fx-screen-hit::before{animation:bfx-card-hit .32s ease-out both}
.battle-fx-card.fx-screen-crit{animation:bfx-card-crit .52s cubic-bezier(.2,.8,.2,1) both}
.battle-fx-card.fx-screen-crit::before{animation:bfx-card-flash .55s ease-out both}
.battle-fx-card .fx-wait-1,.battle-fx-card .fx-wait-2{animation-play-state:paused!important}
.battle-side-monster,.battle-side-player{position:relative;transform-origin:center}
.battle-fx-card .battle-side-monster.fx-hit{animation:bfx-knock .48s cubic-bezier(.19,1,.22,1) both}
.battle-fx-card .battle-side-monster.fx-crit{animation:bfx-knock-crit .64s cubic-bezier(.19,1,.22,1) both}
.battle-fx-card .battle-side-player.fx-hit{animation:bfx-knock-small .46s ease-out both}
.battle-fx-card .battle-side-player.fx-crit{animation:bfx-knock .55s ease-out both}
.battle-fx-card .fx-evade{animation:bfx-dodge .44s ease-out both}
.battle-fx-card .battle-portrait-wrap{position:relative;display:flex;justify-content:center;overflow:visible;isolation:isolate}
.battle-fx-card .battle-monster-img,.battle-fx-card .battle-player-img{position:relative;z-index:1;transform-origin:center center;animation:bfx-idle-bob 2.6s ease-in-out infinite}
.battle-fx-card .battle-side-monster.fx-hit .battle-monster-img{animation:bfx-sprite-flash .52s steps(1,end) both}
.battle-fx-card .battle-side-monster.fx-crit .battle-monster-img{animation:bfx-sprite-crit .68s steps(1,end) both}
.battle-fx-card .battle-side-player.fx-hit .battle-player-img{animation:bfx-sprite-flash .52s steps(1,end) both}
.battle-impact{position:absolute;z-index:2;left:50%;top:50%;width:38px;height:38px;pointer-events:none;border:2px solid var(--accent,#C6F24E);border-radius:50%;box-shadow:0 0 0 3px rgba(198,242,78,.13),0 0 22px rgba(198,242,78,.50);transform:translate(-50%,-50%) scale(.3);opacity:0;animation:bfx-impact .42s ease-out both}
.fx-crit .battle-impact{width:55px;height:55px;border:3px solid #FF9F43;box-shadow:0 0 25px rgba(255,159,67,.8);animation:bfx-impact-crit .58s ease-out both}
.battle-impact-player{top:-2px;border-color:var(--up,#FF6B6B);box-shadow:0 0 18px rgba(255,107,107,.6)}
.battle-fx-card .dmg-float{position:absolute;left:50%;top:0;z-index:7;pointer-events:none;white-space:nowrap;font-family:'Space Grotesk',sans-serif;font-size:27px;font-weight:800;line-height:1.1;letter-spacing:-.03em;transform:translate(-50%,0);animation:bfx-damage 1.15s cubic-bezier(.2,.8,.2,1) both}
.battle-fx-card .dmg-enemy{color:var(--accent,#C6F24E);text-shadow:0 2px 0 #0E1014,0 0 15px rgba(198,242,78,.65)}
.battle-fx-card .dmg-player{color:var(--up,#FF6B6B);text-shadow:0 2px 0 #0E1014,0 0 16px rgba(255,107,107,.7);top:-4px}
.battle-fx-card .dmg-crit{font-size:38px;color:#FFD166;text-shadow:2px 3px 0 #5c2619,0 0 15px rgba(255,159,67,.75);animation:bfx-damage-crit 1.35s cubic-bezier(.2,.8,.2,1) both}
.battle-fx-card .dmg-hits{font-size:14px;opacity:.85}
.battle-fx-card .dmg-miss{font-size:18px;color:var(--text-sub,#A3ACBB);font-style:italic;animation:bfx-miss .95s ease-out both}
.battle-fx-card .dmg-heal{top:-10px;margin-left:40px;font-size:24px;color:#6BCB77;text-shadow:0 0 12px rgba(107,203,119,.6);animation:bfx-heal 1.2s ease-out both}
.battle-fx-card .dmg-poison{top:28px;font-size:18px;color:#7ED957;text-shadow:0 0 10px rgba(126,217,87,.6);animation:bfx-heal 1.2s ease-out both}
.battle-fx-card .dmg-lifesteal{top:-30px;font-size:16px;color:var(--up,#FF6B6B);animation:bfx-heal 1.2s ease-out both}
.battle-fx-card .crit-label{position:absolute;top:-25px;left:50%;z-index:8;white-space:nowrap;color:#FF9F43;font:800 12px 'Space Grotesk',sans-serif;letter-spacing:.12em;text-shadow:0 1px 5px #0E1014;animation:bfx-crit-label 1.1s ease-out both}
.battle-particles{position:absolute;left:50%;top:48%;width:0;height:0;z-index:6;pointer-events:none}
.battle-particles-player{top:-7px}
.battle-particles i{--x:0px;--y:-36px;position:absolute;left:0;top:0;width:5px;height:5px;border-radius:1px;background:var(--accent,#C6F24E);box-shadow:0 0 6px rgba(198,242,78,.75);opacity:0;animation:bfx-particle .56s cubic-bezier(.15,.55,.35,1) both}
.battle-particles-crit i{width:7px;height:7px;background:#FF9F43;animation-duration:.82s}
.battle-particles-player i{background:var(--up,#FF6B6B);box-shadow:0 0 6px rgba(255,107,107,.8)}
.battle-particles i:nth-child(1){--x:-40px;--y:-35px}.battle-particles i:nth-child(2){--x:-16px;--y:-52px}.battle-particles i:nth-child(3){--x:25px;--y:-46px}.battle-particles i:nth-child(4){--x:48px;--y:-15px}
.battle-particles i:nth-child(5){--x:40px;--y:29px}.battle-particles i:nth-child(6){--x:12px;--y:43px}.battle-particles i:nth-child(7){--x:-29px;--y:30px}.battle-particles i:nth-child(8){--x:-50px;--y:3px}
@keyframes bfx-idle-bob{0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)}}
@keyframes bfx-sprite-flash{0%,100%{filter:none;transform:scale(1)} 12%,24%{filter:brightness(0) invert(1);transform:scale(1.07)} 25%,41%{filter:none;transform:translateX(4px)} 42%,55%{filter:brightness(0) saturate(100%) invert(66%) sepia(94%) saturate(1000%) hue-rotate(312deg)} 56%{filter:none;transform:translateX(0)}}
@keyframes bfx-sprite-crit{0%,100%{filter:none;transform:scale(1)} 9%,20%,32%,43%{filter:brightness(0) invert(1);transform:scale(1.14)} 21%,31%,44%,60%{filter:brightness(0) saturate(100%) invert(43%) sepia(77%) saturate(1789%) hue-rotate(321deg);transform:scale(.96)} 61%{filter:none;transform:scale(1.04)}}
@keyframes bfx-knock{0%,100%{transform:translateX(0)} 15%{transform:translateX(-11px)} 32%{transform:translateX(9px)} 48%{transform:translateX(-7px)} 64%{transform:translateX(5px)} 80%{transform:translateX(-2px)}}
@keyframes bfx-knock-crit{0%,100%{transform:translateX(0) scale(1)} 12%{transform:translateX(-17px) scale(1.035)} 27%{transform:translateX(14px) scale(1.02)} 42%{transform:translateX(-10px)} 58%{transform:translateX(8px)} 75%{transform:translateX(-4px)}}
@keyframes bfx-knock-small{0%,100%{transform:translateX(0)} 20%{transform:translateX(6px)} 40%{transform:translateX(-5px)} 60%{transform:translateX(3px)}}
@keyframes bfx-dodge{0%,100%{transform:translateX(0)} 32%{transform:translateX(9px)} 65%{transform:translateX(-3px)}}
@keyframes bfx-card-hit{0%{opacity:0;background:transparent} 13%{opacity:1;background:rgba(255,255,255,.045)} 100%{opacity:0;background:transparent}}
@keyframes bfx-card-flash{0%{opacity:0;background:transparent} 10%{opacity:1;background:rgba(255,107,107,.18)} 33%{opacity:.15;background:rgba(255,255,255,.12)} 100%{opacity:0;background:transparent}}
@keyframes bfx-card-crit{0%,100%{transform:translate(0,0) scale(1)} 13%{transform:translate(-5px,2px) scale(1.012)} 25%{transform:translate(5px,-2px) scale(1.016)} 38%{transform:translate(-4px,1px) scale(1.009)} 52%{transform:translate(3px,0) scale(1.004)} 70%{transform:translate(-1px,0) scale(1)}}
@keyframes bfx-impact{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)} 20%{opacity:.95} 100%{opacity:0;transform:translate(-50%,-50%) scale(2.2)}}
@keyframes bfx-impact-crit{0%{opacity:0;transform:translate(-50%,-50%) scale(.15)} 18%{opacity:1} 100%{opacity:0;transform:translate(-50%,-50%) scale(2.6)}}
@keyframes bfx-damage{0%{opacity:0;transform:translate(-50%,12px) scale(.55)} 16%{opacity:1;transform:translate(-50%,-6px) scale(1.5)} 29%{transform:translate(-50%,-11px) scale(.92)} 44%{transform:translate(-50%,-14px) scale(1.08)} 68%{opacity:1;transform:translate(-50%,-20px) scale(1)} 100%{opacity:0;transform:translate(-50%,-36px) scale(.9)}}
@keyframes bfx-damage-crit{0%{opacity:0;transform:translate(-50%,15px) scale(.45) rotate(-7deg)} 14%{opacity:1;transform:translate(-50%,-8px) scale(1.8) rotate(4deg)} 28%{transform:translate(-50%,-12px) scale(.94) rotate(-2deg)} 45%{transform:translate(-50%,-17px) scale(1.14)} 75%{opacity:1;transform:translate(-50%,-26px) scale(1)} 100%{opacity:0;transform:translate(-50%,-46px) scale(.8)}}
@keyframes bfx-miss{0%{opacity:0;transform:translate(-50%,8px) scale(.75)} 28%{opacity:1;transform:translate(-50%,-9px) scale(1.1)} 70%{opacity:1} 100%{opacity:0;transform:translate(-50%,-30px)}}
@keyframes bfx-heal{0%{opacity:0;transform:translate(-50%,12px) scale(.7)} 22%{opacity:1;transform:translate(-50%,-8px) scale(1.3)} 65%{opacity:1} 100%{opacity:0;transform:translate(-50%,-45px) scale(1)}}
@keyframes bfx-crit-label{0%{opacity:0;transform:translate(-50%,6px) scale(.7)} 20%{opacity:1;transform:translate(-50%,-4px) scale(1.2)} 35%{transform:translate(-50%,-8px) scale(1)} 75%{opacity:1} 100%{opacity:0;transform:translate(-50%,-23px)}}
@keyframes bfx-particle{0%{opacity:0;transform:translate(0,0) scale(.2) rotate(0)} 14%{opacity:1} 100%{opacity:0;transform:translate(var(--x),var(--y)) scale(.5) rotate(160deg)}}
@media(max-width:480px){.battle-fx-card .dmg-crit{font-size:31px}.battle-fx-card .dmg-float{font-size:23px}}

.battle-result-banner {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 40px;
  letter-spacing: 0.08em;
  margin: 2px 0 14px;
  animation: bfx-result-pop 0.5s cubic-bezier(.2,.8,.2,1) both;
}
.battle-result-banner.flee { color: var(--text-sub); font-size: 26px; }

@keyframes bfx-result-pop {
  0% { opacity: 0; transform: scale(0.6) rotate(-4deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.battle-fx-card .battle-side-monster.fx-ko .battle-monster-img {
  animation: bfx-sprite-flash .52s steps(1,end) both, bfx-collapse .7s ease-in .45s both;
}
.battle-fx-card .battle-side-monster.fx-ko.fx-crit .battle-monster-img {
  animation: bfx-sprite-crit .68s steps(1,end) both, bfx-collapse .7s ease-in .6s both;
}

@keyframes bfx-collapse {
  0% { transform: rotate(0deg) translateY(0); opacity: 1; filter: grayscale(0); }
  100% { transform: rotate(78deg) translateY(16px); opacity: 0.55; filter: grayscale(1) brightness(.65); }
}

@media (max-width: 480px) {
  .battle-result-banner { font-size: 30px; }
}

/* 돌진 공격 모션 — 내가 공격하면(1단계) 내 캐릭터가 몬스터 쪽으로 빠르게 다가갔다가
   돌아오고, 몬스터가 반격하면(2단계) 몬스터도 짧게 나에게 다가왔다 물러난다.
   거리는 battle-fx.js가 실제 위치를 측정해 --dash-distance-*로 넘겨준다. */
.fx-dash-player { animation: bfx-dash-player 0.55s cubic-bezier(.25,.6,.3,1) both; }
.fx-dash-monster { animation: bfx-dash-monster 0.5s cubic-bezier(.25,.6,.3,1) both; }

@keyframes bfx-dash-player {
  0%, 8% { transform: translateX(0) skewX(0); }
  18% { transform: translateX(-8px) skewX(-6deg); }
  42% { transform: translateX(var(--dash-distance-player, 70px)) skewX(8deg); }
  56% { transform: translateX(var(--dash-distance-player, 70px)) skewX(0); }
  100% { transform: translateX(0) skewX(0); }
}

@keyframes bfx-dash-monster {
  0%, 8% { transform: translateX(0) skewX(0); }
  18% { transform: translateX(8px) skewX(6deg); }
  42% { transform: translateX(var(--dash-distance-monster, -70px)) skewX(-8deg); }
  56% { transform: translateX(var(--dash-distance-monster, -70px)) skewX(0); }
  100% { transform: translateX(0) skewX(0); }
}

/* 결과 태그(승/패) — 각 캐릭터 머리 위에 따로 떠서 "이긴 쪽/진 쪽"이 바로 보이게 한다. */
.result-tag {
  position: absolute;
  top: -22px;
  left: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  z-index: 9;
  animation: bfx-result-tag-pop 0.5s cubic-bezier(.2,.8,.2,1) both;
  white-space: nowrap;
}
.result-tag.win { color: var(--accent); text-shadow: 0 0 14px rgba(198, 242, 78, .6); }
.result-tag.lose { color: var(--up); text-shadow: 0 0 14px rgba(255, 107, 107, .6); }

/* 카지노(블랙잭/포커/룰렛) 결과 배너 — 전투 화면의 WIN/LOSE 느낌을 그대로 가져온다.
   .result-tag와 달리 특정 캐릭터 이미지 위가 아니라 테이블 상단 중앙에 크게 띄운다. */
.casino-result-banner {
  position: absolute;
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.08em;
  z-index: 20;
  white-space: nowrap;
  animation: bfx-result-tag-pop 0.5s cubic-bezier(.2, .8, .2, 1) both;
  pointer-events: none;
}

/* "WIN/LOSE"가 딜러 쪽(맨 위)에 붙어 있어서 내 결과처럼 안 보인다는 피드백 —
   포커/블랙잭에서는 내 패 쪽(가운데~아래)으로 옮긴다(2026-11-26). */
.table-frame.casino-pk-stage .casino-result-banner,
.table-frame.casino-bj-stage .casino-result-banner {
  top: 46%;
}

.casino-result-banner.win { color: var(--accent); text-shadow: 0 0 20px rgba(198, 242, 78, .7), 0 2px 3px rgba(0,0,0,.8); }
.casino-result-banner.lose { color: var(--up); text-shadow: 0 0 20px rgba(255, 107, 107, .7), 0 2px 3px rgba(0,0,0,.8); }
.casino-result-banner.push { color: var(--text-sub); text-shadow: 0 0 14px rgba(255, 255, 255, .35), 0 2px 3px rgba(0,0,0,.8); }

@media (max-width: 420px) {
  .casino-result-banner { font-size: 21px; }
}

/* 보물찾기 카드처럼 "특정 이미지 위"가 아니라 카드 맨 위에 가운데 정렬로 넣는 경우 —
   absolute+left:50% 포지셔닝 없이 그냥 블록으로 두고, translateX(-50%)가 없는 전용
   키프레임을 쓴다(공용 키프레임을 쓰면 static 요소에서 엉뚱하게 좌우로 밀린다). */
.casino-result-banner.inline {
  position: static;
  left: auto;
  text-align: center;
  margin: 0 0 -4px;
  animation-name: bfx-result-tag-pop-inline;
}

@keyframes bfx-result-tag-pop-inline {
  0% { opacity: 0; transform: scale(0.6) rotate(-4deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* result-tag는 "가운데 정렬"이 translateX(-50%)에 들어있는데, 공용 bfx-result-pop
   키프레임은 transform을 scale/rotate로 통째로 덮어써서 애니메이션이 끝나면
   -50% 이동값이 날아가 중앙정렬이 깨졌다(2026-11-22) — 전용 키프레임으로 분리. */
@keyframes bfx-result-tag-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.6) rotate(-4deg); }
  60% { opacity: 1; transform: translateX(-50%) scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); }
}

/* ───────────────────────────────────────────────────────────────────────
   GPT에게 의뢰한 카지노 3종(블랙잭/포커/보물찾기) 배경이미지 오버레이 위치
   재조정 패치 v2(2026-11-25, casino_responsive_v2 최종본). 위쪽의 같은
   셀렉터 규칙들을 캐스케이드 순서로 덮어쓴다. v1(layout_fix) 내용을 포함하고
   있어 v1은 적용하지 않고 이 블록만 넣는다.
   주의: 원본에 있던 prefers-reduced-motion 분기는 이 환경 특성상 제거했다
   (항상 켜져있어 애니메이션이 전부 안 보이게 됨 — feedback_reduced_motion.md). */
/* Players Company casino image-overlay layout patch — 2026-11-25
   Append AFTER existing /static/style.css rules. Do not replace full style.css.
   Background assets, Jinja2 forms, endpoints and server calculations unchanged. */

/* The img establishes the 700:1243 image's intrinsic height. Every overlay
   uses the SAME image-relative coordinate system on both desktop and mobile. */
.table-frame {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin-inline: auto;
  container-type: inline-size;
  isolation: isolate;
}
.table-frame-bg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.table-zone {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.9cqw, 7px);
  text-align: center;
  min-width: 0;
  z-index: 2;
}
.table-zone .blackjack-hand-label,
.table-zone .item-sub {
  font-size: clamp(10px, 2.1cqw, 14px);
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.table-zone .roulette-message {
  font-size: clamp(10px, 2.0cqw, 13px);
  line-height: 1.4;
}
.table-zone .card-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 1cqw, 8px);
  max-width: 100%;
}
.table-zone .playing-card {
  width: clamp(25px, 8.4cqw, 52px);
  height: auto;
  aspect-ratio: 46 / 64;
  border-radius: 5px;
}
.table-zone .playing-card.small {
  width: clamp(17px, 5.5cqw, 32px);
  height: auto;
  aspect-ratio: 34 / 48;
}
.table-zone .card-face,
.table-zone .card-face.card-back { border-radius: 5px; }
.table-zone .card-face .card-rank { font-size: clamp(11px, 3.1cqw, 18px); }
.table-zone .card-face .card-suit { font-size: clamp(10px, 2.8cqw, 16px); }
.table-zone .playing-card.small .card-face .card-rank { font-size: clamp(9px, 2.1cqw, 13px); }
.table-zone .playing-card.small .card-face .card-suit { font-size: clamp(8px, 1.9cqw, 12px); }

/* Blackjack background: upper dealer pocket ~9–34% of height;
   lower player pocket ~59–82%; bottom controls ~83–96%. */
.table-zone-bj-dealer {
  top: 12%; height: 20%; left: 9%; right: 9%;
}
.table-zone-bj-player {
  top: 62%; height: 17%; left: 9%; right: 9%;
}
.table-zone-bj-info {
  top: 46%; height: 11%; left: 10%; right: 10%;
  justify-content: center;
}
.table-zone-bj-actions {
  top: 84%; height: 11%; left: 7%; right: 7%;
}

/* Treasure map: exact 1:1 image; occupy its central grid instead of leaving
   a huge margin or positioning grid separately beside the parchment. */
.treasure-board-frame {
  position: relative;
  display: block;
  width: min(100%, 440px);
  max-width: 440px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 8px;
  background-image: url('/static/casino/29_treasure_map_v2.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 12% 11% 11%;
}
.treasure-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  width: 100%; height: 100%;
  gap: clamp(5px, 1.6vw, 10px);
}
.treasure-cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: clamp(7px, 2vw, 12px);
  background: rgba(22, 26, 33, .78);
  border: 1px solid rgba(198, 242, 78, .16);
  font-size: clamp(15px, 4vw, 23px);
}
.treasure-cell.opened { background: rgba(22, 26, 33, .84); }
.treasure-cell-icon { width: 60%; height: 60%; object-fit: contain; }
.treasure-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.treasure-side { min-width: 0; overflow-wrap: anywhere; }
.treasure-turn-pill { max-width: 100%; line-height: 1.4; }
.treasure-confirm-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

@media (max-width: 480px) {
  .table-frame-bg { border-radius: 9px; }
  .treasure-card { padding: 12px 10px; gap: 11px; }
  .treasure-vs .item-sub { font-size: 11px; }
  .treasure-board-frame { width: 100%; max-width: 420px; }
  .treasure-board { gap: 5px; }
  .treasure-turn-pill { font-size: 12px; }
}

/* ============================================================
   v2 responsive safety overrides — keep this LAST in style.css
   No backend/POST/CSRF/animation logic changes.
   ============================================================ */
.table-frame.casino-bj-stage,
.table-frame.casino-pk-stage {
  width: 100%; max-width: 700px; min-width: 0;
  aspect-ratio: 700 / 1243;
  position: relative; overflow: hidden;
  container-type: inline-size;
  margin-inline: auto;
  isolation: isolate;
}
.table-frame.casino-bj-stage > .table-frame-bg,
.table-frame.casino-pk-stage > .table-frame-bg {
  display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center; border-radius: 0;
  pointer-events: none; user-select: none;
}
.table-frame.casino-bj-stage .table-zone,
.table-frame.casino-pk-stage .table-zone {
  position: absolute; box-sizing: border-box;
  min-width: 0; max-width: 100%;
  gap: min(0.8cqw, 6px);
}
/* Important: relative to stage, not viewport; no minimum card width
   that could become larger than the underlying illustration. */
/* 사용자가 보내준 "빈 칸 위치" 참고 이미지(202.webp, 원본 941x1672 기준)를 픽셀
   단위로 재보니 카드가 들어갈 자리(점선 박스) 자체가 지금 쓰던 카드보다 훨씬
   컸다 — 위치가 아니라 카드 "크기"가 너무 작아서 칸 안에 붕 떠 보였던 것.
   공용카드/내패칸 실측: 카드폭 약 109px(941 기준) ≈ 11.6cqw(700 기준),
   칸 사이 간격 약 26px ≈ 2.2cqw. 상대 카드(작은 카드)는 약 70px ≈ 7.5cqw,
   간격 약 14px ≈ 1.5cqw (2026-11-25). */
.table-frame.casino-bj-stage .card-row,
.table-frame.casino-pk-stage .card-row {
  display: flex; flex-wrap: nowrap; justify-content: center;
  align-items: center; width: 100%; min-width: 0;
  gap: 2.2cqw;
}
.table-frame.casino-bj-stage .playing-card,
.table-frame.casino-pk-stage .playing-card {
  box-sizing: border-box; width: 11.6cqw; height: auto;
  aspect-ratio: 46 / 64; flex: 0 1 11.6cqw;
  min-width: 0; border-radius: 0.8cqw;
}
.table-frame.casino-bj-stage .card-face,
.table-frame.casino-pk-stage .card-face {
  border-radius: 0.8cqw;
}
.table-frame.casino-bj-stage .card-rank,
.table-frame.casino-pk-stage .card-rank {
  font-size: 4.1cqw; line-height: 1;
}
.table-frame.casino-bj-stage .card-suit,
.table-frame.casino-pk-stage .card-suit {
  font-size: 3.75cqw; line-height: 1;
}
.table-frame.casino-pk-stage .playing-card.small .card-rank { font-size: 3.1cqw; }
.table-frame.casino-pk-stage .playing-card.small .card-suit { font-size: 2.8cqw; }
.table-frame.casino-bj-stage .blackjack-hand-label,
.table-frame.casino-pk-stage .blackjack-hand-label,
.table-frame.casino-bj-stage .item-sub,
.table-frame.casino-pk-stage .item-sub {
  font-size: 2.15cqw; line-height: 1.35;
  max-width: 100%; overflow-wrap: anywhere;
}
.table-frame.casino-bj-stage .table-zone-bj-dealer {
  top: 12%; height: 20%; left: 9%; right: 9%;
}
.table-frame.casino-bj-stage .table-zone-bj-player {
  top: 62%; height: 17%; left: 9%; right: 9%;
}
.table-frame.casino-bj-stage .table-zone-bj-info {
  top: 46%; height: 11%; left: 10%; right: 10%;
}
/* Actions are moved after .table-frame, preserving original forms and URLs.
   These are touch-size controls; DO NOT scale to 1cqw. */
.casino-responsive-actions {
  width: 100%; max-width: 700px;
  margin: 8px auto 0;
}
.casino-responsive-actions .roulette-actions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; margin: 0; width: 100%;
}
.casino-responsive-actions form { min-width: 0; width: 100%; margin: 0; }
.casino-responsive-actions .item-btn {
  box-sizing: border-box; display: flex;
  width: 100%; min-width: 0; min-height: 44px;
  padding: 9px 8px; white-space: normal;
  overflow-wrap: anywhere; line-height: 1.2;
  font-size: clamp(12px, 2.9vw, 14px);
  text-align: center;
}
.casino-responsive-feedback {
  max-width: 700px; margin: 8px auto 0;
  min-width: 0; overflow-wrap: anywhere;
}
.casino-responsive-feedback:empty { display: none; }
.casino-responsive-feedback .roulette-message {
  line-height: 1.5; font-size: 13px;
  white-space: pre-wrap;
}
/* Treasure: map and overlay share a square layout coordinate system.
   Grid gaps/padding are relative to BOARD size, not viewport. */
.treasure-board-frame {
  box-sizing: border-box;
  display: block; position: relative;
  width: min(100%, 440px); max-width: 440px;
  height: auto; aspect-ratio: 1 / 1;
  container-type: inline-size;
  margin-inline: auto; overflow: hidden;
  background-size: 100% 100%; background-position: center;
  padding: 12cqw 11cqw 11cqw;
}
.treasure-board {
  box-sizing: border-box; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  width: 100%; height: 100%; gap: 1.3cqw;
}
.treasure-cell {
  box-sizing: border-box; min-width: 0; min-height: 0;
  width: 100%; height: 100%; padding: 0;
  aspect-ratio: auto; border-radius: 2cqw;
  font-size: clamp(14px, 4.7cqw, 22px);
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
}
.treasure-cell-icon { max-width: 75%; max-height: 75%; object-fit: contain; }
.treasure-vs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.treasure-confirm-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.treasure-confirm-row > .item-btn { min-width: 0; min-height: 44px; text-align: center; }
.treasure-confirm-row .item-btn:only-child { grid-column: 1 / -1; }
@media (max-width: 360px) {
 .casino-responsive-actions .roulette-actions { gap: 6px; }
 .treasure-card { padding: 12px 8px; }
 .treasure-vs { gap: 6px; }
 .treasure-side .item-sub { font-size: 10px; }
}
@media (min-width: 660px) {
 .casino-responsive-actions .roulette-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* ───────────────────────────────────────────────────────────────────────
   블랙잭/포커 배경 이미지에 실제로 그려진 틀(원/둥근사각형) 픽셀 좌표를 직접
   재서 맞춘 최종 보정(2026-11-25) — "카드가 네모칸 한가운데, 캐릭터가 원 안에
   정확히" 요청에 따라 눈대중이 아니라 이미지를 그리드로 측정해서 넣었다.
   포커 상대 3명은 각자 원/사각형 위치가 달라서(가운데 자리가 더 위에 그려짐)
   공용 flex row 대신 좌/가운데/우 3개를 각각 절대좌표로 분리했다. */
/* space-between을 쓰는 이유: 자리마다 "원 위쪽 끝~사각형 아래쪽 끝" 사이 거리가
   다르다(가운데가 더 큼). flex-end로 몰아서 붙이면 둘 다 한쪽으로 쏠려서 자리마다
   따로 보정치를 넣어야 했는데, space-between이면 첫 자식(포트레이트)은 항상 존의
   top(=원 위쪽)에, 마지막 자식(카드)은 항상 존의 bottom(=사각형 아래쪽)에 붙어서
   존 높이가 달라도 보정 없이 자동으로 맞는다(2026-11-25). */
/* ===== Poker seat exact image-coordinate layout (2026-11-25) =====
   Image native size: 700 x 1243. All coordinates use the *same* stage box.
   IMPORTANT: Do not let flex, name height, card contents or animation
   influence the seat positions. Each child has an independent anchor. */
.table-frame.casino-pk-stage .pk-seat {
  --seat-x: 21.1%;
  --portrait-y: 18.6%;
  --cards-y: 24.5%;
  --name-y: 30.0%;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  justify-content: initial;
  align-items: initial;
  gap: 0;
  text-align: center;
  pointer-events: none;
}
.table-frame.casino-pk-stage .pk-seat-left {
  --seat-x: 21.1%; --portrait-y: 18.6%; --cards-y: 24.5%; --name-y: 30.0%;
}
.table-frame.casino-pk-stage .pk-seat-mid {
  --seat-x: 50%; --portrait-y: 16.3%; --cards-y: 22.4%; --name-y: 28.2%;
}
.table-frame.casino-pk-stage .pk-seat-right {
  --seat-x: 78.9%; --portrait-y: 18.6%; --cards-y: 24.5%; --name-y: 30.0%;
}
.table-frame.casino-pk-stage .pk-seat .poker-npc-portrait {
  position: absolute;
  left: var(--seat-x);
  top: var(--portrait-y);
  width: 10.6cqw;
  height: 10.6cqw;
  display: block;
  margin: 0;
  object-fit: cover;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}
.table-frame.casino-pk-stage .pk-seat .card-row {
  position: absolute;
  left: var(--seat-x);
  top: var(--cards-y);
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 1.3cqw;
  transform: translate(-50%, -50%);
  margin: 0;
}
.table-frame.casino-pk-stage .pk-seat .playing-card.small {
  box-sizing: border-box;
  width: 8.1cqw;
  min-width: 0;
  height: auto;
  aspect-ratio: 34 / 48;
  flex: 0 0 8.1cqw;
  margin: 0;
}
.table-frame.casino-pk-stage .pk-seat .pk-seat-name {
  position: absolute;
  left: var(--seat-x);
  right: auto;
  top: var(--name-y);
  width: 24cqw;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  font-size: clamp(10px, 2.3cqw, 16px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-frame.casino-pk-stage .table-zone-pk-community {
  top: 39.2%; height: 13.5%; left: 8.9%; right: 8.9%;
}
.table-frame.casino-pk-stage .table-zone-pk-info {
  top: 74.8%; height: 6%; left: 9%; right: 9%;
}

.table-frame.casino-bj-stage .table-zone-bj-dealer {
  top: 5.6%; height: 17.7%; left: 9%; right: 9%;
}
.table-frame.casino-bj-stage .table-zone-bj-info {
  top: 48.3%; height: 8.8%; left: 10%; right: 10%;
}
.table-frame.casino-bj-stage .table-zone-bj-player {
  top: 58.3%; height: 18.5%; left: 9%; right: 9%;
}




/* v7 - Poker player pocket: label and hand are separately anchored.
   Do not use flex centering to stack these two elements. */
/* left/right가 28.5%/35.5%로 비대칭이었던 게 원인 — 이 박스의 50%(=자식들의
   중심 기준)가 실제 그려진 사각형 중심(이미지 x=350, 정확히 50%)보다 왼쪽으로
   쏠려 있었다. 사각형을 다시 재보니 실제로는 x=225~475로 정확히 대칭이라, 박스도
   대칭(32.1%/32.1%)으로 고치면 자식들의 left:50%가 곧 진짜 중심과 일치한다
   (2026-11-25, 사용자가 카드 묶음 중심 좌표를 직접 재서 알려줌). */
.table-frame.casino-pk-stage .table-zone-pk-player {
  position: absolute;
  top: 63.0%;
  height: 11.0%;
  left: 32.1%;
  right: 32.1%;
  display: block;
  padding: 0;
  overflow: visible;
}
/* 제목/족보상태는 카드(.card-row)와 완전히 독립된 레이어 — bottom:100%로 박스
   "바깥 위쪽"에 띄워서 카드 좌표에는 전혀 영향을 주지 않는다(2026-11-25).
   margin-bottom이 곧 "테두리와의 간격"(약 12px을 700 기준 cqw로 환산). */
.table-frame.casino-pk-stage .table-zone-pk-player > .pk-hand-title-group {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 1.7cqw;
  width: max-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3cqw;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.table-frame.casino-pk-stage .pk-hand-title {
  font-size: clamp(10px, 2.25cqw, 16px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}
.table-frame.casino-pk-stage .pk-hand-status {
  font-size: clamp(9px, 1.9cqw, 13px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
/* 족보 색상 구분 — 과도한 발광 없이 글자색만. 기준은 실제 서버 판정(HAND_NAMES)의
   트리플 이상을 "높은 족보"로 본다. */
.table-frame.casino-pk-stage .pk-hand-status-pending { color: var(--text-sub); }
.table-frame.casino-pk-stage .pk-hand-status-normal { color: var(--text); }
.table-frame.casino-pk-stage .pk-hand-status-high { color: var(--accent); }
.table-frame.casino-pk-stage .table-zone-pk-player > .card-row {
  position: absolute;
  top: 61%; left: 50%;
  transform: translate(-50%, -50%);
  width: max-content; max-width: 100%;
  margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: nowrap; gap: 1.5cqw;
  z-index: 2;
}
.table-frame.casino-pk-stage .table-zone-pk-player > .card-row > .playing-card {
  width: 9.4cqw; flex: 0 0 9.4cqw;
  min-width: 0; height: auto; aspect-ratio: 46 / 64;
}
/* Place round/pot info in the dedicated bottom panel instead of by the hand. */
.table-frame.casino-pk-stage .table-zone-pk-info {
  top: 87%; height: 7%; left: 9%; right: 9%;
  display: flex; justify-content: center; align-items: center;
}

/* ── 2026-11-26: 보유 포인트/오늘 이용을 "내 패" 양옆 빈 공간으로, 조작 버튼을
   이미지 맨 아래 패널 안으로 옮긴다(사용자 지정 설계). 포커/블랙잭 모두 같은
   구조(상태 패널 + 하단 조작 패널)를 공유한다. */

.table-frame.casino-pk-stage .table-zone-pk-points {
  top: 63.0%; height: 11.0%; left: 8%; right: 70%;
}
.table-frame.casino-pk-stage .table-zone-pk-usage {
  top: 63.0%; height: 11.0%; left: 70%; right: 8%;
}
.pk-side-label {
  font-size: clamp(8px, 2cqw, 11px);
  color: var(--text-sub);
  white-space: nowrap;
}
.pk-side-value {
  font-size: clamp(10px, 2.6cqw, 14px);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* 2026-11-26: 하단 패널 실측 좌표로 교체 — 이전 값(83~95%)이 실제 배경 패널
   (86.9~98.2%)보다 높고 짧아서, 44px 버튼+라운드 텍스트가 패널 밖으로
   튀어나가던 버그를 고쳤다(실기기 스크린샷으로 재확인). */
.table-frame.casino-pk-stage .table-zone-pk-actions {
  top: 87%; height: 11%; left: 4%; right: 4%;
  display: flex; flex-direction: column; justify-content: center; gap: 0.5cqw;
}
.pk-round-info { font-size: clamp(8px, 2cqw, 11px); }
/* 버튼이 2개든 3개든(체크/+배팅/쇼다운/폴드 등) 항상 한 줄에 균등폭으로 — 그리드
   2열 + 줄바꿈 대신 flex 1열로 바꿔 "2줄로 꺾이는" 문제를 없앴다(요청사항). */
.pk-action-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 1cqw;
  width: 100%;
}
.pk-action-buttons form { flex: 1 1 0; min-width: 0; margin: 0; }
.pk-action-buttons .item-btn {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  font-size: clamp(10px, 2.4cqw, 13px);
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-frame.casino-bj-stage .table-zone-bj-actions {
  top: 79.5%; height: 14.5%; left: 4%; right: 4%;
  display: flex; align-items: center; justify-content: center;
}
.bj-stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5cqw; width: 100%;
}
.bj-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2cqw; min-width: 0; }
.bj-stat-label { font-size: clamp(8px, 1.9cqw, 11px); color: var(--text-sub); white-space: nowrap; }
.bj-stat-value { font-size: clamp(10px, 2.6cqw, 14px); font-weight: 700; color: var(--accent); white-space: nowrap; }
.bj-stat-divider { width: 1px; align-self: stretch; background: var(--border); flex-shrink: 0; }

.bj-action-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.2cqw;
  width: 100%;
}
.bj-action-buttons form { flex: 1 1 0; min-width: 0; margin: 0; }
.bj-action-buttons .item-btn {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  font-size: clamp(12px, 2.8cqw, 15px);
}

/* 체크/히트 = 라임 배경, 폴드/스탠드 = 빨간 배경 (테두리만 있던 걸 배경색 채우기로,
   이모지는 템플릿에서 제거)(2026-11-26 요청). */
.pk-action-buttons .item-btn,
.bj-action-buttons .item-btn {
  background: var(--accent);
  color: #0E1014;
  border: none;
  font-weight: 700;
}
.pk-action-buttons .item-btn.danger,
.bj-action-buttons .item-btn.danger {
  background: var(--up);
  color: #fff;
}
/* 버튼마다 자기만의 <form>으로 감싸여 있어서, .item-btn 자신은 항상 그 form 안의
   2번째 자식(hidden input 다음)이라 :nth-child가 버튼 "자신"이 아니라 "감싼 form이
   버튼 줄에서 몇 번째인지"를 봐야 한다 — 전에는 이걸 안 지켜서 체크까지 중립색으로
   깔려버렸다(2026-11-26 버그 수정). */
.pk-action-buttons form:nth-child(2) .item-btn:not(.danger),
.pk-action-buttons form:nth-child(3) .item-btn:not(.danger) {
  background: var(--box);
  color: var(--text);
}

.table-frame.casino-pk-stage .table-zone-pk-actions .slot-bet-form,
.table-frame.casino-bj-stage .table-zone-bj-actions .slot-bet-form {
  margin: 0;
  width: 100%;
  gap: 0.8cqw;
}
.table-frame.casino-pk-stage .table-zone-pk-actions .slot-bet-form .item-btn,
.table-frame.casino-bj-stage .table-zone-bj-actions .slot-bet-form .item-btn {
  min-height: 44px;
  box-sizing: border-box;
  font-size: clamp(10px, 2.4cqw, 13px);
  padding: 0 3px;
  flex: 1 1 18%;
}
