/* HappyCity Web UI & HUD */

/* Top Bar HUD */
#top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 20;
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

#top-bar::-webkit-scrollbar {
  display: none;
}

.top-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
}

.map-badge {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--hc-border);
  padding: 4px 12px;
  border-radius: 20px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.coord-badge {
  color: #94a3b8;
  font-size: 13px;
  font-family: monospace;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Minimap */
#minimap-container {
  position: absolute;
  top: 68px;
  right: 12px;
  width: 290px;
  max-height: calc(100vh - 100px);
  height: auto;
  z-index: 20;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 2px solid var(--hc-border);
}

.minimap-header {
  padding: 6px 10px;
  background: rgba(2, 132, 199, 0.5);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--hc-border);
  user-select: none;
  flex-shrink: 0;
  white-space: nowrap;
}

#minimap-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  margin-right: 6px;
}

#minimap-viewport {
  flex: 0 0 auto;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: #020617;
  max-height: 310px;
}

#minimap-viewport::-webkit-scrollbar {
  width: 6px;
}

#minimap-viewport::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
}

#minimap-viewport::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.6);
  border-radius: 3px;
}

#minimap-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.9);
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #020617;
  image-rendering: pixelated;
  cursor: default;
}

/* Bottom Chat & Controls HUD */
#bottom-hud {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
  pointer-events: none;
}

#chat-container {
  pointer-events: auto;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Sky-blue Chat Resizer Handle (하늘색 위로 올리기 조절 바) */
#chat-resizer {
  width: 100%;
  height: 12px;
  margin-bottom: 1px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.chat-resizer-grip {
  width: 64px;
  height: 5px;
  background: #38bdf8;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8), 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: width 0.15s ease, background 0.15s ease, height 0.15s ease, box-shadow 0.15s ease;
  pointer-events: none;
}

#chat-resizer:hover .chat-resizer-grip,
#chat-resizer:active .chat-resizer-grip,
#chat-resizer.resizing .chat-resizer-grip {
  width: 110px;
  height: 6px;
  background: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.95), 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* Red Player HP Gauge directly above Chat Log (5px 두께 체력 바) */
.chat-hp-container {
  width: 100%;
  position: relative;
  z-index: 58;
  margin-bottom: -1px;
  cursor: ns-resize;
  pointer-events: auto;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.chat-hp-track {
  width: 100%;
  height: 5px;
  background: rgba(22, 5, 5, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-hp-container:hover .chat-hp-track,
.chat-hp-container.resizing .chat-hp-track {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), inset 0 1px 2px rgba(0, 0, 0, 0.95);
}

.chat-hp-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 60%, #fca5a5 100%);
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.85);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Low HP Warning Pulse (< 25%) */
.chat-hp-fill.danger {
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
  animation: hpPulse 0.8s infinite alternate ease-in-out;
}

@keyframes hpPulse {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.6); opacity: 0.85; }
  100% { box-shadow: 0 0 12px rgba(239, 68, 68, 1), 0 0 4px #ffffff; opacity: 1; }
}

/* Floating Hover Tooltip Badge (위쪽 리사이저 바와 겹치지 않도록 위로 띄움) */
.chat-hp-badge {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.96);
  color: #fecaca;
  border: 1px solid #ef4444;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Malgun Gothic', 'Dotum', sans-serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 6px rgba(239, 68, 68, 0.4);
  z-index: 100;
}

.chat-hp-container:hover .chat-hp-badge {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

#chat-resizer.resizing,
.chat-hp-container.resizing,
#chat-log.resizing {
  cursor: ns-resize !important;
}

#chat-log {
  max-height: var(--chat-max-height, 360px);
  height: var(--chat-height, 120px);
  min-height: 40px;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--chat-font-size, 13px);
  line-height: 1.4;
  scroll-behavior: auto !important;
  pointer-events: auto;
  border-top-color: #38bdf8 !important;
}

.chat-msg {
  word-break: break-word;
  font-size: var(--chat-font-size, 13px);
  line-height: 1.4;
}

.chat-msg .author {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
}

.chat-msg.system {
  color: #facc15;
  font-style: italic;
}

#chat-input-bar {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

#chat-input {
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--hc-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  pointer-events: auto;
  user-select: text !important;
  -webkit-user-select: text !important;
}

#chat-input:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Speech Bubbles on Canvas / Overlay */
#speech-bubbles-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.speech-bubble {
  position: absolute;
  background: var(--hc-bubble-bg);
  color: var(--hc-bubble-text);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: var(--bubble-font-size, 13px);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transform: translate(-50%, -100%);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 230px;
  min-width: 28px;
  box-sizing: border-box;
  animation: bubblePop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.speech-bubble.fade-out {
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.8);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: var(--hc-bubble-bg) transparent transparent transparent;
}

.speech-bubble.bubble-gold {
  color: #b45309 !important; /* Authentic Deep Gold */
  font-weight: 700 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25), 0 2px 4px rgba(0, 0, 0, 0.12);
  letter-spacing: -0.2px;
}
.speech-bubble.bubble-gold::after {
  border-color: var(--hc-bubble-bg) transparent transparent transparent;
}

/* 특별말투 (I00092_0) 머리 위 말풍선 노란 글씨 */
.speech-bubble.bubble-yellow {
  color: #facc15 !important; /* Authentic Vibrant Yellow */
  font-weight: 800 !important;
  text-shadow: -1px -1px 0 #1e293b, 1px -1px 0 #1e293b, -1px 1px 0 #1e293b, 1px 1px 0 #1e293b, 0 1px 3px rgba(0, 0, 0, 0.45) !important;
  border: 1.5px solid rgba(250, 204, 21, 0.65);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35), 0 2px 4px rgba(0, 0, 0, 0.12);
  letter-spacing: -0.2px;
}
.speech-bubble.bubble-yellow::after {
  border-color: var(--hc-bubble-bg) transparent transparent transparent;
}

@keyframes bubblePop {
  0% { transform: translate(-50%, -80%) scale(0.7); opacity: 0; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

/* Universal Modal Backdrop (Always on top of all HUDs, chat, and mobile docks) */
.modal-backdrop {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Duplicate Login Disconnect Overlay (Full blur covering all menus and background) */
#duplicate-login-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#duplicate-login-modal.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.hc-kicked-window {
  width: 360px !important;
  max-width: 90vw !important;
  background: #003808 !important;
  border: 2px solid #ef4444 !important;
  border-top-color: #f87171 !important;
  border-left-color: #f87171 !important;
  border-bottom-color: #7f1d1d !important;
  border-right-color: #7f1d1d !important;
  border-radius: 6px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(239, 68, 68, 0.45) !important;
  color: #ffffff !important;
  overflow: hidden !important;
  text-align: center !important;
}

.hc-kicked-titlebar {
  background: linear-gradient(180deg, #991b1b 0%, #450a0a 100%) !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-bottom: 1px solid #7f1d1d !important;
  font-weight: bold !important;
  font-size: 13px !important;
  color: #fecaca !important;
  letter-spacing: -0.3px !important;
}

.hc-kicked-body {
  padding: 24px 20px !important;
  background: #002806 !important;
}

.hc-kicked-icon {
  font-size: 42px !important;
  margin-bottom: 12px !important;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) !important;
  line-height: 1 !important;
}

.hc-kicked-main-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #fca5a5 !important;
  margin-bottom: 8px !important;
}

.hc-kicked-desc {
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #e2e8f0 !important;
  margin-bottom: 22px !important;
  word-break: keep-all !important;
}

.hc-kicked-btn {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%) !important;
  border: 1px solid #f87171 !important;
  color: #ffffff !important;
  font-weight: bold !important;
  font-size: 13px !important;
  padding: 8px 28px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: all 0.15s ease !important;
}

.hc-kicked-btn:hover {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6) !important;
}

/* Floating non-modal window layer: transparent, no blur, no dimming, allows clicking game world */
.hc-floating-window-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 150;
  pointer-events: none;
  overflow: hidden;
}

.hc-floating-window-layer.active {
  pointer-events: none;
}

.hc-floating-window-layer .hc-joycity-window {
  pointer-events: auto;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 90, 13, 0.5);
}

.modal-content {
  width: 90%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-modal-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

#map-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--hc-border);
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

#map-search-input:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.map-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.map-tab {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.map-tab.active, .map-tab:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #f8fafc;
}

.map-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.map-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.map-card:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.map-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: #020617;
  object-fit: cover;
  flex-shrink: 0;
}

.map-card-info {
  flex: 1;
  min-width: 0;
}

.map-card-name {
  font-weight: 700;
  color: #f8fafc;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Mobile Virtual Joystick */
#virtual-joystick {
  position: absolute;
  bottom: 80px;
  left: 30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: none;
  z-index: 30;
  pointer-events: auto;
  touch-action: none;
}

#joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  pointer-events: none;
}

@media (pointer: coarse) {
  #virtual-joystick {
    display: block;
  }
}

/* ==========================================================================
   Login & Character Selection Modal
   ========================================================================== */
#login-modal {
  z-index: 10000 !important;
}

.login-dialog {
  max-width: 500px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid #38bdf8;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  z-index: 10001 !important;
  position: relative;
}

/* 접속창(로그인/캐릭터 선택 및 생성) 활성화 시 인게임 채팅창/모바일독/조이스틱 등 인게임 HUD 완벽 숨김 */
body.login-active #bottom-hud,
body.login-active .mobile-only-dock,
body.login-active #virtual-joystick,
body.login-active #top-bar,
body:has(#login-modal.active) #bottom-hud,
body:has(#login-modal.active) .mobile-only-dock,
body:has(#login-modal.active) #virtual-joystick,
body:has(#login-modal.active) #top-bar,
body:has(#login-modal:not(.closing):not([style*="display: none"])) #bottom-hud,
body:has(#login-modal:not(.closing):not([style*="display: none"])) .mobile-only-dock,
body:has(#login-modal:not(.closing):not([style*="display: none"])) #virtual-joystick,
body:has(#login-modal:not(.closing):not([style*="display: none"])) #top-bar {
  display: none !important;
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 1px;
}

.login-logo-title .logo-accent {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.login-section {
  margin-bottom: 18px;
}

.login-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  pointer-events: none;
}

.hc-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.hc-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.gender-toggle-group {
  display: flex;
  gap: 6px;
}

.gender-tab {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gender-tab.active, .gender-tab:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #f8fafc;
}

.character-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.char-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1.5px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.char-card:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.char-card.selected {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.char-portrait-box {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.char-portrait-img {
  width: 35px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.char-info-box {
  flex: 1;
  min-width: 0;
}

.char-name-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-name {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.char-badge {
  font-size: 10px;
  font-weight: 700;
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
}

.char-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-login-primary {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
}

.btn-login-primary:hover {
  background: linear-gradient(135deg, #0369a1, #4f46e5);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   Emote Expressions (감정표현) Floating Draggable Window
   ========================================================================== */
#emote-picker {
  position: fixed;
  display: none;
  flex-direction: column;
  padding: 8px;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid #22c55e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  border-radius: 8px;
  z-index: 1000;
  width: 230px;
  box-sizing: border-box;
  user-select: none;
}

.emote-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  border-radius: 6px 6px 0 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
  margin: -8px -8px 8px -8px;
}

.emote-titlebar:active {
  cursor: grabbing;
}

.emote-title-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #f0fdf4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.emote-close-btn {
  background: transparent;
  border: none;
  color: #bbf7d0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.emote-close-btn:hover,
.emote-close-btn:active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.85);
}

.emote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.emote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.emote-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  transform: scale(1.06);
}

.emote-btn:active {
  background: rgba(34, 197, 94, 0.3);
  border-color: #22c55e;
  transform: scale(0.96);
}

.emote-icon {
  font-size: 18px;
  line-height: 1;
}

.emote-name {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}

.emote-hotkey {
  font-size: 9px;
  font-weight: 600;
  color: #38bdf8;
  line-height: 1;
  letter-spacing: -0.2px;
}

/* ==========================================================================
   Mobile Responsive Styles (스마트폰 / 태블릿 세로 화면 최적화)
   ========================================================================== */
@media (max-width: 768px) {
  #top-bar {
    top: 6px;
    left: 6px;
    right: 6px;
    height: 40px;
    padding: 0 8px;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .top-info {
    gap: 6px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .map-badge {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 모바일에서 불필요한 좌표 및 FPS 숨김으로 상단 여유 공간 확보 */
  .coord-badge,
  #fps-counter {
    display: none !important;
  }

  .top-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .top-actions .hc-btn {
    padding: 4px 8px;
    font-size: 11px;
    height: 30px;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 모바일 미니맵 축소 및 높이 지도에 맞춤 */
  #minimap-container {
    top: 50px;
    right: 6px;
    width: 175px;
    max-height: calc(100vh - 120px);
    min-height: unset;
    height: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
  }

  .minimap-header {
    padding: 3px 6px;
    font-size: 10px;
    gap: 4px;
    white-space: nowrap;
  }

  #minimap-viewport {
    flex: 0 0 auto;
    height: auto;
    max-height: calc(100vh - 160px);
  }

  /* 모바일 하단 HUD 및 채팅창 최적화 */
  #bottom-hud {
    bottom: 6px;
    left: 6px;
    right: 6px;
    gap: 6px;
  }

  #chat-container {
    max-width: 100%;
    gap: 4px;
  }

  #chat-log {
    height: 85px;
    max-height: 95px;
    min-height: 40px;
    padding: 6px 8px;
    font-size: var(--chat-font-size, 12px);
    line-height: 1.35;
  }

  #chat-input-bar {
    gap: 4px;
  }

  #chat-input-bar .hc-btn {
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #chat-input {
    font-size: 13px;
    padding: 6px 10px;
    height: 34px;
  }
}

/* 초소형 모바일 화면 (폭 480px 이하) 버튼 텍스트 스마트 단축 */
@media (max-width: 480px) {
  #top-bar {
    padding: 0 6px;
    gap: 6px;
  }

  .top-actions .hc-btn {
    padding: 4px 6px;
    font-size: 11px;
  }

  /* 감정표현 텍스트 숨기고 이모지 아이콘 표시 */
  #btn-emote .btn-text {
    display: none;
  }

  /* 모바일 감정표현 팝업 드래그 및 터치 최적화 */
  #emote-picker {
    width: 250px !important;
    max-width: 90vw !important;
    padding: 8px !important;
    z-index: 9999 !important;
    border: 2px solid #22c55e !important;
    border-radius: 10px !important;
  }

  .emote-btn {
    padding: 10px 4px !important;
    min-height: 48px !important;
    touch-action: manipulation !important;
  }

  .emote-icon {
    font-size: 22px !important;
  }

  .emote-name {
    font-size: 11px !important;
  }

  #btn-fullscreen {
    padding: 4px 6px;
  }
}


/* ==========================================================================
   Mobile Dedicated Layout & Responsive Window System (모바일 가로/세로 최적화)
   ========================================================================== */

/* 1. Mobile Quick Dock (기본: PC에서는 숨김) */
.mobile-only-dock {
  display: none !important;
}

/* 2. 모바일 세로 모드 (Portrait: max-width: 768px 및 세로 비율) */
@media (max-width: 768px) and (orientation: portrait), (max-width: 500px) {
  /* 상단 탑바 UI 패널 완전 제거 (배경, 테두리, 그림자 투명화) - 가로 모드와 동일하게 투명 오버레이 */
  #top-bar.hc-window,
  #top-bar {
    position: fixed !important;
    top: 8px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    z-index: 2000 !important;
  }

  /* 세로 화면에서도 하단에 퀵 메뉴 독이 있으므로 상단 메뉴 버튼들은 완전히 숨김 */
  #top-bar .top-actions {
    display: none !important;
  }

  .top-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  /* 맵이름: 뒤에 미니패널 없이 초록색 글자에 진한 검정 테두리 */
  #map-name-badge {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #4ade80 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    text-shadow: 
      -1px -1px 0 #000,
       1px -1px 0 #000,
      -1px  1px 0 #000,
       1px  1px 0 #000,
      -2px  0px 0 #000,
       2px  0px 0 #000,
       0px -2px 0 #000,
       0px  2px 0 #000,
       0px  0px 4px rgba(0, 0, 0, 0.9) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) !important;
  }

  /* 좌표: 뒤에 미니패널 없이 초록색 글자에 진한 검정 테두리 */
  #coord-badge {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #86efac !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: monospace, sans-serif !important;
    white-space: nowrap !important;
    text-shadow: 
      -1px -1px 0 #000,
       1px -1px 0 #000,
      -1px  1px 0 #000,
       1px  1px 0 #000,
      -2px  0px 0 #000,
       2px  0px 0 #000,
       0px -2px 0 #000,
       0px  2px 0 #000,
       0px  0px 4px rgba(0, 0, 0, 0.9) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) !important;
  }

  #fps-counter {
    display: none !important;
  }

  /* 하단 엄지손가락 퀵 메뉴 독 (Portrait 세로 모드: 상점, 가방, 지하철, 직업 등 하단 메뉴 100% 노출) */
  .mobile-only-dock {
    display: flex !important;
    position: fixed !important;
    bottom: 6px !important;
    left: 6px !important;
    right: 6px !important;
    height: 50px !important;
    z-index: 2500 !important; /* 채팅창(z-index: 50/1000)보다 훨씬 위로 올려 완벽 노출 및 터치 보장 */
    background: rgba(0, 24, 6, 0.96) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1.5px solid #16a34a !important;
    border-radius: 10px !important;
    padding: 3px 4px !important;
    gap: 3px !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .mob-dock-btn {
    flex: 1 !important;
    min-width: 0 !important;
    height: 44px !important;
    background: rgba(0, 48, 11, 0.8) !important;
    border: 1px solid #15803d !important;
    border-radius: 6px !important;
    color: #f0fdf4 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
    padding: 2px 1px !important;
    -webkit-tap-highlight-color: transparent !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .mob-dock-btn:active {
    transform: scale(0.92) !important;
    background: #16a34a !important;
  }

  .mob-dock-btn span {
    font-size: 10px !important;
    font-weight: bold !important;
    color: #86efac !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  /* 하단 채팅창 HUD: 하단 독(높이 50px + 바닥 6px) 위로 배치하여 독을 가리지 않음 */
  #bottom-hud {
    bottom: 60px !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-width: calc(100vw - 12px) !important;
    box-sizing: border-box !important;
    z-index: 1000 !important;
  }

  #chat-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #chat-log {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: var(--chat-height, 70px);
    max-height: var(--chat-max-height, 320px);
    min-height: 35px !important;
    padding: 4px 6px !important;
    font-size: var(--chat-font-size, 11.5px) !important;
    line-height: 1.35 !important;
  }

  /* 갤럭시 S25(360px) 및 모바일 화면 채팅창 오른쪽 잘림/전송 버튼 미노출 완벽 해결 */
  #chat-input-bar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  #btn-emote {
    flex: 0 0 auto !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 16px !important;
  }

  #btn-emote .btn-text {
    display: none !important;
  }

  #btn-chat-options {
    flex: 0 0 auto !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 15px !important;
  }

  #chat-input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    padding: 6px 8px !important;
    height: 34px !important;
  }

  #btn-chat-send {
    flex: 0 0 auto !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #virtual-joystick {
    bottom: 185px !important;
    left: 16px !important;
  }

  /* 세로 모드 창 크기 잘림 완벽 방지: 모든 팝업 창 중앙 배치 및 반응형 너비/높이 */
  #shop-window,
  #inventory-window,
  #transit-window,
  #settings-window,
  #othello-modal,
  #map-modal .modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 84vh !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    margin: 0 !important;
    border-radius: 8px !important;
    z-index: 3300 !important;
  }

  /* 세로 모드 로그인/캐릭터 선택 및 생성 모달 최상단 노출 및 최적화 */
  .modal-content.login-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 95vw !important;
    max-width: 480px !important;
    max-height: 94vh !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 14px 12px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    z-index: 10001 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .login-dialog .login-header {
    margin-bottom: 8px !important;
  }

  .login-dialog .login-subtitle {
    font-size: 12px !important;
    margin-top: 2px !important;
  }

  .login-dialog .login-section {
    margin-bottom: 8px !important;
  }

  .login-dialog .character-cards-grid {
    max-height: 180px !important;
    overflow-y: auto !important;
  }

  .login-dialog .login-actions {
    margin-top: 10px !important;
    padding-bottom: 2px !important;
    flex-shrink: 0 !important;
  }

  /* 상점 창 세로 모드 최적화: 오직 열려있을 때(.open)만 flex 1단 스택 적용 */
  #shop-window.open {
    display: flex !important;
    flex-direction: column !important;
  }

  /* 닫힌 창(display:none 또는 .hidden)은 모든 !important를 무시하고 100% 숨김 보장 */
  #shop-window.hidden,
  #shop-window[style*="display: none"],
  #inventory-window.hidden,
  #inventory-window[style*="display: none"],
  #transit-window.hidden,
  #transit-window[style*="display: none"],
  #settings-window.hidden,
  #settings-window[style*="display: none"],
  #othello-modal.hidden,
  #othello-modal[style*="display: none"],
  .hc-job-window.hidden,
  .hc-job-window[style*="display: none"],
  .hc-workstation-window.hidden,
  .hc-workstation-window[style*="display: none"],
  .hc-window.hidden {
    display: none !important;
  }

  #othello-modal.open,
  #othello-modal:not(.hidden):not([style*="display: none"]) {
    display: flex !important;
  }

  #shop-window .hc-win-body {
    flex: 1 1 0% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 6px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #shop-window .shop-catalog-col {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 140px !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #shop-window .shop-detail-col {
    width: 100% !important;
    height: auto !important;
    flex: 0 0 auto !important;
  }

  #transit-window {
    width: 95vw !important;
  }

  #transit-window .transit-body {
    flex-direction: column !important;
  }

  #transit-minimap-box {
    height: 150px !important;
  }

  /* 직업 창 세로 모드 최적화 (채팅창 가림 완벽 방지: 상단 배치 + 큼직한 가독성 크기 + 자유 드래그 이동 지원) */
  .hc-job-window {
    position: fixed !important;
    top: 25px;
    left: calc(50% - (min(357px, 96vw) / 2));
    right: auto !important;
    bottom: auto !important;
    width: 388px !important;
    max-width: none !important;
    max-height: calc(88vh / 0.92) !important;
    transform: scale(min(0.92, calc(96vw / 388px)));
    transform-origin: top left;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.9) !important;
    border-radius: 8px !important;
    z-index: 3300 !important;
    touch-action: none;
  }

  .hc-job-main-container {
    display: flex !important;
    flex-direction: row !important;
  }

  .hc-workstation-window {
    position: fixed !important;
    top: 25px;
    left: calc(50% - 175px);
    right: auto !important;
    bottom: auto !important;
    width: 350px !important;
    max-width: calc(100vw - 10px) !important;
    max-height: calc(100vh - 180px) !important;
    transform: none !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 3500 !important;
    touch-action: none;
  }

  .hc-workstation-body {
    padding: 6px !important;
    gap: 6px !important;
  }

  .hc-workstation-stage {
    height: auto !important;
    min-height: 200px !important;
    max-height: 250px !important;
    padding: 4px !important;
  }

  .stove-stage {
    gap: 6px !important;
  }
}

/* 3. 모바일 가로 모드 (Landscape Mode: 세로 높이가 520px 이하인 기기 및 가로 화면) */
@media (max-width: 950px) and (orientation: landscape), (max-height: 520px) and (orientation: landscape) {
  /* 상단 탑바 UI 패널 자체를 완전 제거 (배경, 테두리, 그림자 투명화) */
  #top-bar.hc-window,
  #top-bar {
    position: fixed !important;
    top: 8px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    z-index: 200 !important;
  }

  /* 상단 탑바의 메뉴 버튼들은 우측 사이드 독에 있으므로 완전히 숨김 */
  #top-bar .top-actions {
    display: none !important;
  }

  .top-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  /* 맵이름: 뒤에 미니패널 없이 초록색 글자에 진한 검정 테두리 */
  #map-name-badge {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #4ade80 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    text-shadow: 
      -1px -1px 0 #000,
       1px -1px 0 #000,
      -1px  1px 0 #000,
       1px  1px 0 #000,
      -2px  0px 0 #000,
       2px  0px 0 #000,
       0px -2px 0 #000,
       0px  2px 0 #000,
       0px  0px 4px rgba(0, 0, 0, 0.9) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) !important;
  }

  /* 좌표: 뒤에 미니패널 없이 초록색 글자에 진한 검정 테두리 */
  #coord-badge {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #86efac !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: monospace, sans-serif !important;
    white-space: nowrap !important;
    text-shadow: 
      -1px -1px 0 #000,
       1px -1px 0 #000,
      -1px  1px 0 #000,
       1px  1px 0 #000,
      -2px  0px 0 #000,
       2px  0px 0 #000,
       0px -2px 0 #000,
       0px  2px 0 #000,
       0px  0px 4px rgba(0, 0, 0, 0.9) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) !important;
  }

  #fps-counter {
    display: none !important;
  }

  /* 가로 모드에서는 우측 세로 사이드 독으로 도킹하여 화면 시야 극대화 */
  .mobile-only-dock {
    display: flex !important;
    position: fixed !important;
    top: 50% !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    flex-direction: column !important;
    width: 48px !important;
    height: auto !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    background: rgba(0, 24, 6, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1.5px solid #16a34a !important;
    border-radius: 10px !important;
    padding: 5px 3px !important;
    gap: 4px !important;
    z-index: 2500 !important; /* HUD 위로 올려 터치 확실하게 인식 */
    pointer-events: auto !important;
    touch-action: manipulation !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85) !important;
  }

  .mob-dock-btn {
    width: 42px !important;
    height: 36px !important;
    min-width: unset !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
  }

  .mob-dock-btn span {
    display: none !important; /* 가로 모드에서는 아이콘만 표시하여 세로 공간 절약 */
  }

  #bottom-hud {
    right: 64px !important; /* 우측 사이드 독 공간 확보 */
    bottom: 4px !important;
    left: 8px !important;
  }

  #minimap-container {
    top: 36px !important;
    right: 64px !important; /* 우측 메뉴와 겹침 방지 */
    width: 180px !important;
    max-height: calc(100vh - 44px) !important;
    min-height: unset !important;
    height: auto !important;
  }

  .minimap-header {
    padding: 3px 6px !important;
    font-size: 10px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  #minimap-title {
    font-size: 10px !important;
  }

  #minimap-viewport {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: calc(100vh - 72px) !important;
  }

  #chat-log {
    height: var(--chat-height, 50px);
    max-height: var(--chat-max-height, 220px);
  }

  /* 가로 모드 감정표현 팝업 드래그 및 최상위 노출 */
  #emote-picker {
    width: 250px !important;
    max-width: 90vw !important;
    padding: 8px !important;
    z-index: 9999 !important;
    border: 2px solid #22c55e !important;
    border-radius: 10px !important;
  }

  /* 가로 모드 창 크기 최적화 (높이 94vh 제한 및 스크롤) */
  #shop-window,
  #inventory-window,
  #transit-window,
  #settings-window,
  #othello-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    max-height: 94vh !important;
    max-width: 86vw !important;
    overflow-y: auto !important;
  }

  /* 가로 모드 직업창 축소 최적화 (상단 배치 + 컴팩트 축소 + 자유 드래그 이동 지원) */
  .hc-job-window {
    position: fixed !important;
    top: 20px;
    left: calc(50% - 140px);
    right: auto !important;
    bottom: auto !important;
    width: 388px !important;
    max-width: none !important;
    max-height: calc(96vh / 0.72) !important;
    transform: scale(min(0.72, calc(90vh / 430px)));
    transform-origin: top left;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.9) !important;
    border-radius: 8px !important;
    z-index: 3300 !important;
    touch-action: none;
  }

  .hc-job-main-container {
    display: flex !important;
    flex-direction: row !important;
  }

  .hc-workstation-window {
    position: fixed !important;
    top: 15px;
    left: calc(50% - 210px);
    right: auto !important;
    bottom: auto !important;
    width: 620px !important;
    max-width: none !important;
    max-height: calc(96vh / 0.68) !important;
    transform: scale(min(0.68, calc(90vh / 420px)));
    transform-origin: top left;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 3300 !important;
    touch-action: none;
  }

  /* 가로 모드 상점 창: 상단바/탭/배너/본문이 정상적으로 세로 스택(column)으로 쌓이도록 보장 */
  #shop-window.open {
    display: flex !important;
    flex-direction: column !important;
    width: 94vw !important;
    max-width: 720px !important;
    height: 96vh !important;
    max-height: 96vh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  #shop-window #shop-titlebar {
    width: 100% !important;
    height: 28px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    padding: 2px 8px !important;
  }

  #shop-window .hc-win-tabs {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 2px 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 30px !important;
    box-sizing: border-box !important;
  }

  #shop-window .hc-win-tab {
    padding: 2px 7px !important;
    font-size: 11px !important;
    height: 24px !important;
    line-height: 24px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  #shop-window #shop-keeper-banner {
    width: 100% !important;
    padding: 2px 8px !important;
    height: 28px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  #shop-window #shop-keeper-name {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  #shop-window #shop-keeper-quote {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 260px !important;
  }

  #shop-window #shop-player-bn {
    font-size: 10.5px !important;
  }

  /* 본문 영역: 가로 화면이므로 좌측 목록(flex: 1.3) + 우측 상세/구매(flex: 1) 2열 가로 배치 및 세로 스크롤 허용 */
  #shop-window .hc-win-body {
    width: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: calc(96vh - 90px) !important;
    max-height: calc(96vh - 90px) !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 좌측 카탈로그 목록 */
  #shop-window .shop-catalog-col {
    flex: 1.3 !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #001f05 !important;
    border-radius: 6px !important;
  }

  #shop-window #shop-catalog-list {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  /* 우측 상세 정보 및 결제 영역 */
  #shop-window .shop-detail-col {
    flex: 1 !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow-y: auto !important;
    padding: 6px 8px !important;
    background: #001f05 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  #shop-window #shop-preview-icon {
    width: 44px !important;
    height: 44px !important;
    margin: 0 auto !important;
  }

  #shop-window #shop-preview-name {
    font-size: 13px !important;
    margin-top: 2px !important;
  }

  #shop-window #shop-preview-desc {
    font-size: 10px !important;
    min-height: 32px !important;
    max-height: 48px !important;
    padding: 4px 6px !important;
    line-height: 1.3 !important;
    overflow-y: auto !important;
  }

  #shop-window #btn-shop-action {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  /* 가로 모드 염색실 뷰: 염색 탭 활성화 시에만 flex 노출, 숨김 시 반드시 display: none */
  #shop-window #shop-dye-view:not([style*="display: none"]):not(.hidden) {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    overflow-y: auto !important;
    padding-bottom: 2px !important;
  }

  #shop-window #shop-dye-view[style*="display: none"],
  #shop-window #shop-dye-view.hidden,
  #shop-window #shop-goods-view[style*="display: none"],
  #shop-window #shop-goods-view.hidden {
    display: none !important;
  }

  #shop-window .shop-dye-preview-col {
    flex: 1.1 !important;
    min-width: 130px !important;
    overflow-y: auto !important;
    max-height: 100% !important;
    padding: 3px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
  }

  #shop-window .shop-dye-preview-col div[style*="radial-gradient"] {
    width: 120px !important;
    height: 125px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  #shop-window .shop-dye-preview-col canvas {
    width: 110px !important;
    height: 115px !important;
  }

  #shop-window .shop-dye-palette-col {
    flex: 1.4 !important;
    min-width: 0 !important;
    overflow-y: auto !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 4px 6px !important;
  }

  #shop-window #shop-dye-swatches-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    max-height: 98px !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #shop-window .dye-swatch-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 2px 4px !important;
    gap: 4px !important;
    background: #001503 !important;
    border: 1px solid #14532d !important;
    border-radius: 4px !important;
    cursor: pointer !important;
  }

  #shop-window .dye-swatch-card.selected {
    background: #166534 !important;
    border: 2px solid #22c55e !important;
  }

  #shop-window .dye-color-box {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    border-radius: 3px !important;
  }

  #shop-window .dye-color-name-text {
    display: block !important;
    font-size: 10px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  #shop-window .shop-dye-palette-col div:last-child {
    flex-shrink: 0 !important;
    margin-top: 4px !important;
    padding-top: 4px !important;
    border-top: 1px solid #14532d !important;
    display: flex !important;
    gap: 4px !important;
  }

  #shop-window .shop-dye-palette-col button {
    padding: 5px 3px !important;
    font-size: 10.5px !important;
  }
}


/* ==============================================
   AUTHENTIC HAPPYCITY JOYCITY WINDOWS & JOB SYSTEM
   Pixel-perfect replication of j0022, j0017, j0016, j0018, j0019, j0020
   ============================================== */

.hc-joycity-window {
  background: #1e293b;
  border: 2px solid #5b738e;
  border-top-color: #8da4be;
  border-left-color: #8da4be;
  border-bottom-color: #26364a;
  border-right-color: #26364a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: 'Dotum', '돋움', 'Apple SD Gothic Neo', sans-serif;
  user-select: none;
  overflow: hidden;
  position: relative;
}

.hc-joycity-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  height: 28px;
  background: linear-gradient(180deg, #3a506b 0%, #203144 100%);
  border-bottom: 1px solid #141e2a;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.hc-title-text {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 1px #000000;
  display: inline-block;
  line-height: 1;
}

.hc-title-sprite {
  height: 20px;
  image-rendering: pixelated;
  display: block;
}

.hc-title-hotkey {
  font-size: 11px;
  color: #38bdf8;
  font-weight: bold;
}

.hc-joycity-close-btn {
  background: #334155;
  border: 1px solid #64748b;
  border-top-color: #94a3b8;
  border-left-color: #94a3b8;
  border-bottom-color: #1e293b;
  border-right-color: #1e293b;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
  touch-action: manipulation;
}

.hc-joycity-close-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
}

.hc-joycity-close-btn:hover {
  background: #ef4444;
  border-color: #fca5a5;
  color: #ffffff;
}

/* --- 직업창 (j0022.jcr, 388x410) --- */
.hc-job-window, .hc-workstation-window {
  background: #003808; /* User specified exact HappyCity green: #003808 */
  border: 2px solid #005a0d;
  border-top-color: #007812;
  border-left-color: #007812;
  border-bottom-color: #002605;
  border-right-color: #002605;
}

.hc-job-window .hc-joycity-titlebar,
.hc-workstation-window .hc-joycity-titlebar {
  background: linear-gradient(180deg, #004d0b 0%, #002806 100%);
  border-bottom: 1px solid #001f04;
}

.hc-job-window {
  width: 388px;
  max-width: 95vw;
}

.hc-job-main-container {
  display: flex;
  background: #003808; /* User specified exact HappyCity green: #003808 */
  position: relative;
  overflow: visible;
}

.hc-job-content-area {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: #003808;
}

/* Top Card: Avatar + Job Info */
.hc-job-top-card {
  display: flex;
  gap: 10px;
  background: #003808;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 8px;
}

.hc-job-icon-box {
  width: 80px;
  height: 108px;
  background: #002806;
  border: 1px solid #005a0d;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

.hc-job-large-icon {
  width: 50px;
  height: 48px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hc-job-rank-badge {
  font-size: 10px;
  font-weight: bold;
  color: #86efac;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
  margin-top: 6px;
}

.hc-job-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
}

.hc-job-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hc-job-title-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hc-job-main-name {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.hc-btn-job-rankup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  height: 20px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fef08a;
  border-radius: 3px;
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  animation: pulse-job-rankup 1.1s infinite alternate ease-in-out;
  transition: transform 0.1s, filter 0.1s;
}

.hc-btn-job-rankup:hover {
  filter: brightness(1.2);
  transform: scale(1.06);
}

.hc-btn-job-rankup:active {
  transform: scale(0.96);
}

@keyframes pulse-job-rankup {
  0% {
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.5);
    border-color: #fde047;
  }
  100% {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.95), 0 0 4px #f59e0b;
    border-color: #ffffff;
  }
}

.hc-job-type-tag {
  font-size: 10px;
  color: #86efac;
  background: #193816;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #275923;
}

/* Gauge Row (74x12 authentic 2-frame gauge sprite from j0022_2) */
.hc-job-gauge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hc-job-gauge-label {
  font-size: 11px;
  color: #cbd5e1;
  width: 38px;
}

.hc-job-exp-val-row {
  margin-top: 1px;
}

.hc-job-exp-val-text {
  font-size: 11px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 1px #000;
  letter-spacing: 0.5px;
}

.hc-gauge-frame-wrap {
  position: relative;
  width: 74px;
  height: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.hc-gauge-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 74px;
  height: 12px;
  background-image: url('/scratch/extracted_jcrs/j0022_2_74x24.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.hc-gauge-fill-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 12px;
  width: 0%;
  background-image: url('/scratch/extracted_jcrs/j0022_2_74x24.png');
  background-position: 0 -12px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transition: width 0.3s ease;
  z-index: 1;
}

.hc-gauge-pct-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 1px 2px #000000;
  z-index: 2;
  pointer-events: none;
}

/* 3 Item Slots Tray (j0022_3.png) */
.hc-job-slot-tray-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hc-slot-tray-bg {
  position: relative;
  width: 137px;
  height: 46px;
}

.hc-slot-tray-img {
  width: 137px;
  height: 46px;
  image-rendering: pixelated;
  display: block;
}

.hc-slot-items-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 137px;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 3px;
}

.hc-slot-item-node {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* Green Authentic '능력사용' Button (j0022_5.png) */
.hc-btn-ability {
  width: 67px;
  height: 26px;
  background-image: url('/scratch/extracted_jcrs/j0022_5_67x78.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  border: none;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.hc-btn-ability:hover {
  background-position: 0 -26px;
}

.hc-btn-ability:active {
  background-position: 0 -52px;
}

/* Description / Requirement Slot (j0022_4.png) */
.hc-job-desc-slot-box {
  background: #002806;
  border: 1px solid #005a0d;
  border-radius: 3px;
  padding: 6px 8px;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.hc-job-desc-content {
  font-size: 11px;
  color: #bbf7d0;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Subselector Section */
.hc-job-subselector-section {
  background: #003808;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 6px;
}

.hc-job-subtab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  color: #86efac;
  font-weight: bold;
}

#hc-job-subtab-title {
  white-space: nowrap;
  flex-shrink: 0;
}

.hc-job-category-pills {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.hc-job-cat-pill {
  padding: 1px 7px;
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid #005a0d;
  background: #002806;
  color: #86efac;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
}

.hc-job-cat-pill:hover {
  background: #004d0b;
  color: #ffffff;
}

.hc-job-cat-pill.active {
  background: #005a0d;
  border-color: #22c55e;
  color: #ffffff;
  font-weight: bold;
}

#hc-job-action-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hc-mini-action-btn {
  background: #005a0d;
  color: #ffffff;
  border: 1px solid #22c55e;
  border-radius: 3px;
  font-size: 10px;
  padding: 1px 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.hc-mini-action-btn:hover {
  background: #007812;
}

.hc-job-learned-tag {
  background: #064e3b;
  color: #34d399;
  border: 1px solid #059669;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.hc-btn-title-switch {
  background: #1e3a8a;
  color: #93c5fd;
  border: 1px solid #3b82f6;
}

.hc-btn-title-switch:hover {
  background: #2563eb;
  color: #ffffff;
}

.hc-btn-title-switch.active {
  background: #14532d;
  color: #86efac;
  border: 1px solid #22c55e;
  cursor: default;
}

.hc-btn-title-hide {
  background: #374151;
  color: #d1d5db;
  border: 1px solid #6b7280;
}

.hc-btn-title-hide:hover {
  background: #4b5563;
  color: #ffffff;
}

.hc-btn-title-hide.active {
  background: #451a1a;
  color: #fca5a5;
  border: 1px solid #ef4444;
  cursor: default;
}

.hc-job-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.hc-job-grid-cell {
  position: relative;
  background: #002806;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cell-learned-tag {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #059669;
  color: #ffffff;
  font-size: 8px;
  font-weight: bold;
  padding: 0 3px;
  border-radius: 2px;
  line-height: 12px;
  pointer-events: none;
}

.hc-job-grid-cell:hover {
  background: #004009;
  border-color: #22c55e;
}

.hc-job-grid-cell.active {
  background: #005a0d;
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.hc-job-grid-icon {
  width: 32px;
  height: 30px;
  image-rendering: pixelated;
  object-fit: contain;
}

.hc-job-grid-label {
  font-size: 10px;
  color: #cbd5e1;
}

/* Right Side Toggle Button (우리식 레트로 직업 계열 전환 버튼) */
.hc-job-side-toggle-container {
  width: 28px;
  background: #002e07;
  border-left: 1.5px solid #005a0d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 2px;
  box-shadow: inset 1px 0 3px rgba(0, 0, 0, 0.5);
}

.hc-job-side-toggle-btn {
  width: 22px;
  min-height: 84px;
  cursor: pointer;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.4);
  color: #451a03;
  font-weight: 800;
  user-select: none;
  transition: all 0.12s ease;
  outline: none;
}

.hc-job-side-toggle-btn:hover {
  background: linear-gradient(180deg, #fef9c3 0%, #facc15 50%, #d97706 100%);
  border-color: #a16207;
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 6px #f59e0b;
  transform: scale(1.04);
}

.hc-job-side-toggle-btn:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hc-job-side-toggle-btn .toggle-arrow {
  font-size: 10px;
  line-height: 1;
  color: #78350f;
}

.hc-job-side-toggle-btn .toggle-txt {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  color: #451a03;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  word-break: keep-all;
}

/* Gathering Bag Section */
.hc-job-bag-section {
  background: #003808;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 6px;
}

.hc-job-bag-items-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.hc-bag-item-cell {
  background: #002806;
  border: 1px solid #005a0d;
  border-radius: 3px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 38px;
}

.hc-bag-item-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  object-fit: contain;
}

.hc-bag-item-count {
  font-size: 9px;
  color: #86efac;
  font-weight: bold;
}

/* ==============================================
   AUTHENTIC WORKSTATION MODAL & MINIGAMES
   ============================================== */
.hc-workstation-window {
  width: 620px;
  max-width: 96vw;
  background: #003808;
}

.hc-workstation-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #003808;
}

.hc-workstation-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #003808;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 6px 10px;
}

.hc-badge-gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
}

.hc-badge-blue {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
}

.hc-workstation-stage {
  height: 320px;
  background: #003808; /* User specified exact HappyCity green: #003808 */
  border: 2px solid #005a0d;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hc-workstation-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #003808;
  border: 1px solid #005a0d;
  border-radius: 4px;
  padding: 6px 10px;
}

.hc-recipe-dropdown {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 11px;
  max-width: 320px;
}

.hc-btn-retro {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  border: 1px solid #7dd3fc;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 14px;
  cursor: pointer;
}

.hc-btn-retro:hover {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
}

@media (max-height: 640px), (max-width: 680px) {
  .hc-workstation-body {
    padding: 6px !important;
    gap: 4px !important;
  }
  .hc-workstation-stage {
    height: 220px !important;
  }
  .hc-workstation-control-bar {
    padding: 4px 6px !important;
  }
  .hc-recipe-dropdown {
    font-size: 11px !important;
    max-width: 180px !important;
  }
}

/* --- Tailor Minigame (j0017 옷만들기 - 5-Lane 바느질) --- */
.tailor-stage {
  width: 273px;
  height: 196px;
  background-image: url('../assets/minigames/tailor/j0017_1_273x196.png');
  background-repeat: no-repeat;
  image-rendering: pixelated;
  position: relative;
  border: 1px solid #475569;
  border-radius: 4px;
  overflow: hidden;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.tailor-hit-line {
  position: absolute;
  top: 120px;
  left: 10px;
  width: 253px;
  height: 7px;
  background-image: url('../assets/minigames/tailor/j0017_2_253x7.png');
  background-repeat: no-repeat;
  image-rendering: pixelated;
  z-index: 5;
  pointer-events: none;
}

.tailor-needle {
  position: absolute;
  top: 105px;
  left: 22px;
  width: 37px;
  height: 21px;
  background-image: url('../assets/minigames/tailor/j0017_3_37x84.png');
  background-repeat: no-repeat;
  background-position: 0 0;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 10;
  transition: left 0.08s ease-out;
}

.tailor-needle.frame-1 {
  background-position: 0 -21px;
}

.tailor-needle.frame-2 {
  background-position: 0 -42px;
}

.tailor-stitch-node {
  position: absolute;
  width: 8px;
  height: 6px;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 6;
}

.tailor-stitch-node.thread-v1 {
  background: url('../assets/minigames/tailor/j0017_4_8x12.png') 0 0 no-repeat;
}

.tailor-stitch-node.thread-v2 {
  background: url('../assets/minigames/tailor/j0017_4_8x12.png') 0 -6px no-repeat;
}

.tailor-stitch-node.stitch-miss {
  background: url('../assets/minigames/tailor/j0017_5_8x18.png') 0 0 no-repeat;
}

.tailor-stitch-node.stitch-hit-left {
  background: url('../assets/minigames/tailor/j0017_5_8x18.png') 0 -6px no-repeat;
}

.tailor-stitch-node.stitch-hit-right {
  background: url('../assets/minigames/tailor/j0017_5_8x18.png') 0 -12px no-repeat;
}

.tailor-lane-guide {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 8;
}

.tailor-key-badge {
  font-size: 9px;
  font-weight: bold;
  color: #fde047;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #475569;
  border-radius: 2px;
  padding: 0 4px;
}

/* --- Cook / Stove Minigame (j0016 음식만들기 & j0015 가스레인지 1구) --- */
.stove-stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px;
  user-select: none;
}

.stove-thermometer-wrap {
  width: 23px;
  height: 96px;
  position: relative;
  background-image: url('../assets/minigames/common/j0016_5_23x192.png');
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  flex-shrink: 0;
  overflow: hidden;
}

.stove-mercury-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 23px;
  height: 0px;
  background-image: url('../assets/minigames/common/j0016_5_23x192.png');
  background-position: 0 bottom;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transition: height 0.1s linear;
}

.stove-sweet-spot-guide {
  display: none;
}

.stove-main-area {
  width: 247px;
  height: 140px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.stove-base-sprite {
  width: 247px;
  height: 102px;
  background-image: url('../assets/minigames/cook/j0016_6_247x102.png');
  background-repeat: no-repeat;
  image-rendering: pixelated;
  position: relative;
}

.stove-flame-canvas {
  position: absolute;
  top: 3px;
  left: 46px;
  width: 155px;
  height: 44px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}

.stove-knobs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.stove-knob-btn {
  width: 52px;
  height: 54px;
  cursor: pointer;
  image-rendering: pixelated;
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: 0 0;
  padding: 0;
  transition: transform 0.05s ease;
}

.stove-knob-btn:active, .stove-knob-btn.pressed {
  background-position: 0 -53px;
  transform: translateY(1px);
}

.stove-knob-up {
  background-image: url('../assets/minigames/cook/j0015_8_56x106.png');
}

.stove-knob-down {
  background-image: url('../assets/minigames/cook/j0015_9_56x106.png');
}

/* --- Builder FPair Minigame (j0018 가전만들기 5x5 폭탄 1개) --- */
.fpair-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fpair-alert-banner {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 4px;
  text-align: center;
  transition: all 0.2s ease;
}

.fpair-alert-banner.warning {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #f87171;
  animation: alertPulse 0.8s infinite alternate;
}

.fpair-alert-banner.memorize {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.fpair-alert-banner.normal {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #0284c7;
  color: #38bdf8;
}

@keyframes alertPulse {
  from { opacity: 0.7; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.02); }
}

.fpair-board-container {
  width: 202px;
  height: 202px;
  background-image: url('../assets/minigames/builder/j0018_17_202x202.png');
  background-repeat: no-repeat;
  background-size: 202px 202px;
  image-rendering: pixelated;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
}

.fpair-board-container.shake {
  animation: boardShake 0.4s ease-in-out;
}

@keyframes boardShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px) rotate(-1deg); }
  40%, 80% { transform: translateX(6px) rotate(1deg); }
}

.fpair-card-tile {
  width: 36px;
  height: 36px;
  position: absolute;
  cursor: pointer;
  user-select: none;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fpair-card-tile:hover:not(.matched):not(.locked) {
  filter: brightness(1.2);
}

.fpair-card-img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  display: block;
}

.fpair-card-tile.bomb-revealed {
  box-shadow: 0 0 10px #ef4444;
  border: 1.5px solid #ef4444;
  animation: bombPulse 0.5s infinite alternate;
}

@keyframes bombPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.4) drop-shadow(0 0 6px #ef4444); }
}

.fpair-card-tile.matched {
  opacity: 0.65;
  cursor: default;
  filter: grayscale(0.2);
}

/* Gathering Materials Bag Tray */
.hc-job-bag-section {
  background: #111a26;
  border: 1px solid #28394e;
  border-radius: 4px;
  padding: 6px;
  margin-top: 6px;
}

.hc-job-bag-items-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-height: 90px;
  overflow-y: auto;
  padding: 2px;
}

.hc-bag-item-cell {
  position: relative;
  background: #172436;
  border: 1px solid #33475f;
  border-radius: 4px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hc-bag-item-cell:hover {
  border-color: #38bdf8;
  background: #1e334d;
  transform: translateY(-1px);
}

.hc-bag-item-icon {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
  object-fit: contain;
}

.hc-bag-item-count {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 10px;
  font-weight: bold;
  font-family: monospace;
  color: #fde047;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* Authentic HappyCity Window Styles (Inventory, Shop, Transit) */
.hc-window {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 0 1px #166534;
  border-radius: 6px;
  overflow: hidden;
  background: #002b06;
  font-family: 'Malgun Gothic', 'Dotum', sans-serif;
  user-select: none;
}

.hc-win-titlebar {
  background: #003808;
  border-bottom: 2px solid #166534;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.hc-win-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hc-win-close {
  background: #991b1b;
  color: #ffffff;
  border: 1px solid #f87171;
  border-radius: 3px;
  width: 22px;
  height: 22px;
  line-height: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hc-win-close:hover {
  background: #dc2626;
  border-color: #fca5a5;
  transform: scale(1.05);
}

.hc-win-tabs {
  background: #001f05;
  padding: 6px 8px 0 8px;
  border-bottom: 1px solid #166534;
  display: flex;
  gap: 4px;
}

.hc-win-tab {
  background: #002e08;
  color: #86efac;
  border: 1px solid #14532d;
  border-bottom: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hc-win-tab:hover {
  background: #00420b;
  color: #ffffff;
}

.hc-win-tab.active {
  background: #014d0f;
  color: #ffffff;
  border-color: #22c55e;
  border-bottom: 1px solid #014d0f;
  margin-bottom: -1px;
}

.inv-slot-cell:hover {
  border-color: #4ade80 !important;
  transform: scale(1.05);
}

.shop-item-card:hover {
  background: #0a3d16 !important;
  border-color: #4ade80 !important;
}

.transit-exit-item:hover {
  background: #0a3d16 !important;
  border-color: #4ade80 !important;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #38bdf8; }
  100% { transform: scale(1.2); opacity: 1.0; box-shadow: 0 0 12px #38bdf8; }
}

.transit-map-chip {
  user-select: none;
}

/* ==========================================================================
   Modern RPG Inventory UI (요즘식 게임 인벤토리 가방)
   ========================================================================== */
#inventory-window.hc-modern-inventory {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 15, 29, 0.98) 100%) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.15) !important;
  width: 375px !important;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  transition: box-shadow 0.2s ease;
}

.inv-modern-header {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.inv-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-capacity-pill {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
}

.inv-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-header-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inv-header-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  border-color: #38bdf8;
}

.inv-header-btn.expand-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.inv-header-btn.expand-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45) 0%, rgba(5, 150, 105, 0.55) 100%);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.inv-header-btn.expand-btn.max-reached,
.inv-header-btn.expand-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.4);
  box-shadow: none !important;
  transform: none !important;
}

.inv-close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-close-btn:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.05);
}

/* Category Tabs */
.inv-tab-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 12px 0 12px;
  gap: 6px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.inv-tab {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.inv-tab:hover {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.15);
}

.inv-tab.active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.4);
  border-bottom: 1px solid transparent;
  box-shadow: inset 0 2px 0 #38bdf8;
}

/* Main Body & Slot Grid */
.inv-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  grid-auto-rows: 60px;
  gap: 8px;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.1);
  max-height: 284px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.inv-grid-container::-webkit-scrollbar {
  width: 6px;
}

.inv-grid-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 3px;
}

.inv-grid-container::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

.inv-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.7);
}

.inv-modern-slot {
  width: 60px;
  height: 60px;
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1.5px solid rgba(71, 85, 105, 0.45);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.inv-modern-slot:hover {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(30, 41, 59, 0.8) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.inv-modern-slot.selected {
  border-color: #facc15 !important;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45), inset 0 0 8px rgba(250, 204, 21, 0.2) !important;
  transform: scale(1.03);
}

.inv-modern-slot.inv-slot-pressing {
  transform: scale(0.92) !important;
  border-color: #f87171 !important;
  background: rgba(239, 68, 68, 0.25) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5) !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
}

.inv-modern-slot.empty {
  cursor: default;
}

.inv-modern-slot.empty:hover {
  border-color: rgba(71, 85, 105, 0.6);
  transform: none;
  box-shadow: none;
}

.inv-slot-num {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.25);
  pointer-events: none;
}

.inv-slot-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.inv-slot-equipped-tag {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  padding: 1px 3px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-slot-count-tag {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 10px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 0 4px;
  border-radius: 4px;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

/* +1 Slot Expansion Tile in Grid */
.inv-modern-slot.expand-slot {
  background: repeating-linear-gradient(
    45deg,
    rgba(16, 185, 129, 0.06),
    rgba(16, 185, 129, 0.06) 6px,
    rgba(15, 23, 42, 0.45) 6px,
    rgba(15, 23, 42, 0.45) 12px
  );
  border: 1.5px dashed rgba(52, 211, 153, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.inv-modern-slot.expand-slot:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #34d399;
  border-style: solid;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.inv-expand-icon {
  font-size: 16px;
  line-height: 1;
}

.inv-expand-label {
  font-size: 8.5px;
  font-weight: 800;
  color: #a7f3d0;
  line-height: 1;
}

.inv-expand-cost {
  font-size: 8px;
  font-weight: 700;
  color: #fde047;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Item Detail Showcase Panel */
.inv-detail-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.inv-detail-preview {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.inv-detail-preview img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.inv-detail-preview .placeholder {
  font-size: 26px;
  opacity: 0.6;
}

.inv-detail-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-detail-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-detail-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-detail-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.inv-detail-pill.slot {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.inv-detail-pill.equipped {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.inv-detail-price {
  font-size: 11.5px;
  font-weight: 700;
  color: #facc15;
}

.inv-detail-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action Buttons */
.inv-action-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.inv-btn-modern {
  padding: 8px 0;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  user-select: none;
}

.inv-btn-modern:disabled {
  opacity: 0.35;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.inv-btn-equip {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

.inv-btn-equip.is-equipped {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #34d399;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}

.inv-btn-equip:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-use {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.inv-btn-use:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-sell {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border-color: #facc15;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
}

.inv-btn-sell:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-drop {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  border-color: #f87171;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.inv-btn-drop:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Wallet Footer */
.inv-wallet-bar {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-wallet-label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

/* Item Detail Showcase Panel */
.inv-detail-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.inv-detail-preview {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.inv-detail-preview img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.inv-detail-preview .placeholder {
  font-size: 26px;
  opacity: 0.6;
}

.inv-detail-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-detail-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-detail-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-detail-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.inv-detail-pill.slot {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.inv-detail-pill.equipped {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.inv-detail-price {
  font-size: 11.5px;
  font-weight: 700;
  color: #facc15;
}

.inv-detail-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action Buttons */
.inv-action-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.inv-btn-modern {
  padding: 8px 0;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  user-select: none;
}

.inv-btn-modern:disabled {
  opacity: 0.35;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.inv-btn-equip {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

.inv-btn-equip.is-equipped {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #34d399;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}

.inv-btn-equip:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-use {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.inv-btn-use:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-sell {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border-color: #facc15;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
}

.inv-btn-sell:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.inv-btn-drop {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  border-color: #f87171;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.inv-btn-drop:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Wallet Footer */
.inv-wallet-bar {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-wallet-label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-wallet-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #facc15;
  letter-spacing: 0.3px;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

/* ==========================================================================
   Modern Shop UI (요즘식 게임 상점 창)
   ========================================================================== */
#shop-window.hc-modern-shop {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 15, 29, 0.98) 100%) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.15) !important;
  width: 700px !important;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}

.shop-modern-tab-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 12px 0 12px;
  gap: 5px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  overflow-x: auto;
}

.shop-modern-tab {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.shop-modern-tab:hover {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.15);
}

.shop-modern-tab.active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.4);
  border-bottom: 1px solid transparent;
  box-shadow: inset 0 2px 0 #38bdf8;
}

.shop-modern-card {
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1.5px solid rgba(71, 85, 105, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.shop-modern-card:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  transform: translateY(-1px);
}

.shop-modern-card.selected {
  background: rgba(250, 204, 21, 0.15) !important;
  border-color: #facc15 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3) !important;
}

.shop-modern-card-thumb {
  width: 42px;
  height: 42px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.shop-modern-card-thumb img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ==========================================================================
   Avatar Equipment Compatibility System (아바타 장착 호환성 뱃지 & 스타일)
   ========================================================================== */
.inv-detail-pill.compat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.inv-detail-pill.compat.compat-all {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.inv-detail-pill.compat.compat-match {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.inv-detail-pill.compat.compat-forbidden {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.5);
  animation: pulse-border 2s infinite ease-in-out;
}

.inv-btn-modern.inv-btn-equip.is-incompatible {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.35) 0%, rgba(159, 18, 57, 0.5) 100%) !important;
  color: #fca5a5 !important;
  border: 1.5px solid rgba(244, 63, 94, 0.6) !important;
  cursor: pointer;
}

.inv-btn-modern.inv-btn-equip.is-incompatible:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.5) 0%, rgba(159, 18, 57, 0.7) 100%) !important;
  border-color: #f43f5e !important;
}

.inv-modern-slot.is-incompatible-slot {
  border-color: rgba(244, 63, 94, 0.35) !important;
}

.inv-slot-compat-tag {
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.shop-badge-compat {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.2;
}

.shop-badge-compat.all {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.shop-badge-compat.match {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.shop-badge-compat.forbidden {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.shop-detail-compat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 4px;
}

.shop-detail-compat-badge.compat-all {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.shop-detail-compat-badge.compat-match {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.shop-detail-compat-badge.compat-forbidden {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

/* ==========================================================================
   Mobile Responsive Layout for Shop & Dye Studio (#shop-window, #dye-window)
   모바일 세로화면(Portrait) 완벽 규격 최적화
   ========================================================================== */
@media (max-width: 768px) and (orientation: portrait) {
  #shop-window,
  #dye-window {
    top: 4px !important;
    left: 2vw !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 96vw !important;
    max-width: 96vw !important;
    height: calc(100dvh - 8px) !important;
    max-height: calc(100dvh - 8px) !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    z-index: 3400 !important;
    box-sizing: border-box !important;
  }

  #shop-window.hidden,
  #dye-window.hidden {
    display: none !important;
  }

  /* Titlebar */
  #shop-window .hc-win-titlebar,
  #dye-window .hc-win-titlebar {
    padding: 6px 10px !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    box-sizing: border-box !important;
  }

  #shop-window .hc-win-title,
  #dye-window .hc-win-title {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  /* Navigation Tabs: Single Row Flex with horizontal scroll for compact icons */
  #shop-window .hc-win-tabs,
  #dye-window .hc-win-tabs {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    box-sizing: border-box !important;
  }

  #shop-window .hc-win-tabs::-webkit-scrollbar,
  #dye-window .hc-win-tabs::-webkit-scrollbar {
    height: 3px !important;
  }

  #shop-window .hc-win-tabs::-webkit-scrollbar-thumb,
  #dye-window .hc-win-tabs::-webkit-scrollbar-thumb {
    background: #166534 !important;
    border-radius: 2px !important;
  }

  #shop-window .hc-win-tab,
  #dye-window .hc-win-tab {
    white-space: nowrap !important;
    padding: 3px 8px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    min-height: 26px !important;
    height: 26px !important;
    min-width: 30px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  /* Shop Greeting Banner: Slim and compact */
  #shop-keeper-banner {
    padding: 4px 8px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    height: 38px !important;
    background: #002206 !important;
    border-bottom: 1px solid #166534 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
  }

  #shop-keeper-banner > div:first-child {
    font-size: 18px !important;
  }

  #shop-keeper-name {
    font-size: 11px !important;
    font-weight: bold !important;
    color: #4ade80 !important;
  }

  #shop-keeper-quote {
    font-size: 9.5px !important;
    color: #bbf7d0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 170px !important;
  }

  #shop-keeper-banner > div:last-child {
    font-size: 10.5px !important;
    color: #fef08a !important;
    background: #003808 !important;
    border: 1px solid #166534 !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
  }

  /* Main body */
  #shop-window .hc-win-body,
  #dye-window .hc-win-body {
    padding: 6px !important;
    flex: 1 1 0% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* =========================================================================
     View Display & Hidden Enforcement (Display:none must NEVER be overridden)
     ========================================================================= */
  #shop-goods-view[style*="display: none"],
  #shop-goods-view.hidden,
  .shop-goods-view[style*="display: none"],
  .shop-goods-view.hidden,
  #shop-dye-view[style*="display: none"],
  #shop-dye-view.hidden,
  .shop-dye-view[style*="display: none"],
  .shop-dye-view.hidden {
    display: none !important;
  }

  /* =========================================================================
     View 1: Goods Catalog & Purchase View (모바일 세로 스택 최적화: 여백 제거 및 목록 확장)
     ========================================================================= */
  #shop-window .shop-goods-view:not([style*="display: none"]):not(.hidden),
  .shop-goods-view:not([style*="display: none"]):not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    gap: 6px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    box-sizing: border-box !important;
  }

  #shop-window .shop-catalog-col,
  .shop-catalog-col {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 140px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #001f05 !important;
    border: 1px solid #14532d !important;
    border-radius: 6px !important;
  }

  #shop-window .shop-catalog-col > div:first-child,
  .shop-catalog-col > div:first-child {
    flex-shrink: 0 !important;
  }

  #shop-window #shop-catalog-list,
  #shop-catalog-list {
    max-height: none !important;
    height: auto !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  #shop-window .shop-detail-col,
  .shop-detail-col {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 50vh !important;
    padding: 8px 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background: #001f05 !important;
    border: 1px solid #14532d !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  #shop-window #shop-preview-icon,
  #shop-preview-icon {
    width: 44px !important;
    height: 44px !important;
  }

  #shop-window #shop-preview-name,
  #shop-preview-name {
    font-size: 13px !important;
    margin-top: 3px !important;
  }

  #shop-window #shop-preview-desc,
  #shop-preview-desc {
    max-height: 42px !important;
    min-height: 24px !important;
    font-size: 10.5px !important;
    padding: 4px 6px !important;
    margin-top: 4px !important;
    line-height: 1.35 !important;
  }

  #shop-window .shop-detail-col div[style*="단가"],
  #shop-window .shop-detail-col div:has(#shop-qty-row),
  .shop-detail-col div[style*="단가"],
  .shop-detail-col div:has(#shop-qty-row) {
    margin-top: 4px !important;
    padding: 5px 8px !important;
  }

  #shop-window #btn-shop-action,
  #btn-shop-action {
    padding: 9px !important;
    font-size: 13.5px !important;
    font-weight: bold !important;
    background: #16a34a !important;
    color: #ffffff !important;
    border: 1.5px solid #4ade80 !important;
    border-radius: 6px !important;
    margin-top: 5px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4) !important;
  }

  /* =========================================================================
     View 2: Integrated Dye Studio View (모바일 세로 스택)
     ========================================================================= */
  .shop-dye-view:not([style*="display: none"]):not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: min-content !important;
    gap: 6px !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    padding-bottom: 8px !important;
  }

  #dye-window .hc-win-body {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    gap: 6px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Left/Top Preview Container: Horizontal side-by-side */
  .shop-dye-preview-col,
  #dye-window .hc-win-body > div:first-child {
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 8px !important;
    display: grid !important;
    grid-template-columns: 96px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 4px 8px !important;
    align-items: start !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* Hide redundant header text inside preview to save vertical space */
  .shop-dye-preview-col > div:first-child,
  #dye-window .hc-win-body > div:first-child > div:first-child {
    display: none !important;
  }

  /* Avatar Canvas Box: Left column */
  .shop-dye-preview-col div[style*="radial-gradient"],
  #dye-window div[style*="radial-gradient"] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 90px !important;
    height: 98px !important;
    margin: 0 auto !important;
  }

  .shop-dye-preview-col canvas,
  #dye-window canvas {
    width: 86px !important;
    height: 94px !important;
  }

  /* Rotation Buttons below Avatar Canvas */
  .shop-dye-preview-col div:has(#btn-shop-dye-rotate-left),
  #dye-window div:has(#btn-dye-rotate-left) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    gap: 2px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .shop-dye-preview-col button[id*="rotate"],
  #dye-window button[id*="rotate"] {
    padding: 2px 4px !important;
    font-size: 9.5px !important;
  }

  #shop-dye-dir-label,
  #dye-dir-label {
    min-width: 26px !important;
    font-size: 9.5px !important;
  }

  /* Part Visibility Box: Right column */
  .shop-dye-preview-col div:has(#shop-dye-parts-grid),
  #dye-window div:has(#dye-parts-visibility-grid) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 4px 6px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  #shop-dye-parts-grid,
  #dye-parts-visibility-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hc-part-toggle-btn {
    padding: 3px 4px !important;
    font-size: 9.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Presets: Right column row 2 */
  .shop-dye-preview-col div:has(#btn-shop-dye-burgundy),
  #dye-window div:has(#btn-dye-preset-burgundy) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding-top: 0 !important;
    border-top: none !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .shop-dye-preview-col div:has(#btn-shop-dye-burgundy) button,
  #dye-window div:has(#btn-dye-preset-burgundy) button {
    flex: 1 !important;
    padding: 3px 2px !important;
    font-size: 9.5px !important;
    white-space: nowrap !important;
  }

  /* Right/Bottom Palette Container */
  .shop-dye-palette-col,
  #dye-window .hc-win-body > div:last-child {
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    box-sizing: border-box !important;
    padding: 6px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    gap: 6px !important;
  }

  .shop-dye-palette-col > div:first-child,
  .shop-dye-palette-top-wrap,
  #dye-window .hc-win-body > div:last-child > div:first-child {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }

  /* Subtabs (상의, 하의, 신발, 모자, 특수1~4, 헤어): 4-Column Grid */
  .shop-dye-palette-col div:first-child > div:first-child,
  .shop-dye-subtabs-wrap,
  #dye-window .hc-win-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 3px 3px !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    margin-bottom: 5px !important;
  }

  .hc-shop-dye-subtab {
    white-space: nowrap !important;
    padding: 3px 2px !important;
    font-size: 9.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 4px !important;
    min-height: 23px !important;
    height: 23px !important;
    box-sizing: border-box !important;
  }

  #shop-dye-part-label {
    font-size: 11.5px !important;
    color: #86efac !important;
  }

  #shop-dye-color-name {
    font-size: 11px !important;
    color: #facc15 !important;
  }

  /* Color Palette Swatches: 2 columns, explicit min-height, touch scroll & zero collapsing */
  #shop-dye-swatches-grid,
  #dye-swatches-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 4px 6px !important;
    min-height: 180px !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-shrink: 0 !important;
    padding-right: 2px !important;
  }

  .dye-swatch-card,
  #shop-dye-swatches-grid > div,
  #dye-swatches-grid > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 4px 6px !important;
    gap: 6px !important;
    background: #001503 !important;
    border: 1px solid #14532d !important;
    border-radius: 4px !important;
    cursor: pointer !important;
  }

  .dye-swatch-card.selected,
  #shop-dye-swatches-grid > div.selected,
  #dye-swatches-grid > div.selected {
    background: #166534 !important;
    border: 2px solid #22c55e !important;
  }

  .dye-color-box {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    border-radius: 3px !important;
  }

  .dye-color-name-text,
  #shop-dye-swatches-grid span,
  #dye-swatches-grid span {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  /* Action Buttons: Anchored comfortably below the swatches */
  .shop-dye-palette-col > div:last-child,
  .shop-dye-actions-wrap,
  #dye-window .hc-win-body > div:last-child > div:last-child {
    display: flex !important;
    gap: 6px !important;
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    padding-top: 8px !important;
    border-top: 1px solid #14532d !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #btn-shop-dye-apply-all,
  #btn-dye-apply-all {
    flex: 1.5 !important;
    padding: 8px 4px !important;
    font-size: 11.5px !important;
    font-weight: bold !important;
    background: #16a34a !important;
    color: #ffffff !important;
    border: 1px solid #4ade80 !important;
    border-radius: 4px !important;
  }

  #btn-shop-dye-apply,
  #btn-dye-apply-part {
    flex: 1.2 !important;
    padding: 8px 4px !important;
    font-size: 10.5px !important;
    font-weight: bold !important;
    background: #003808 !important;
    color: #86efac !important;
    border: 1px solid #166534 !important;
    border-radius: 4px !important;
  }

  #btn-shop-dye-reset,
  #btn-dye-reset-part {
    flex: 1 !important;
    padding: 8px 2px !important;
    font-size: 10px !important;
    background: #002b06 !important;
    color: #94a3b8 !important;
    border: 1px solid #14532d !important;
    border-radius: 4px !important;
  }
}

/* ==========================================================
   Active Skill Mode Floating HUD Badge (PC & Mobile Toggle)
   ========================================================== */
.hc-active-skill-hud {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #38bdf8;
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  font-family: 'Galmuri9', sans-serif;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  animation: hcSkillHudPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.hc-active-skill-hud:hover {
  background: rgba(30, 41, 59, 0.98);
  border-color: #f43f5e;
  transform: translateX(-50%) scale(1.05);
}

.hc-skill-hud-pulse {
  color: #22c55e;
  font-size: 11px;
  animation: hcSkillPulse 1.2s infinite ease-in-out;
}

@keyframes hcSkillPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

@keyframes hcSkillHudPop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.85); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.hc-skill-hud-icon {
  font-size: 16px;
  line-height: 1;
}

.hc-skill-hud-label {
  color: #f1f5f9;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hc-skill-hud-btn {
  background: rgba(244, 63, 94, 0.28);
  border: 1px solid rgba(244, 63, 94, 0.7);
  color: #fecdd3;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 11px;
  margin-left: 4px;
  transition: background 0.15s, color 0.15s;
}

.hc-active-skill-hud:hover .hc-skill-hud-btn {
  background: #f43f5e;
  color: #ffffff;
}

/* ==========================================================
   Chat Options & System Message Toggle UI
   ========================================================== */
.btn-chat-gear {
  padding: 0 6px !important;
  font-size: 13px !important;
  min-width: 28px !important;
  height: 26px !important;
  line-height: 26px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-options-window {
  position: absolute;
  bottom: 34px;
  left: 82px;
  width: 220px;
  z-index: 95;
  background: #f1f5f9;
  border: 2px solid #38bdf8;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  font-family: 'Galmuri9', sans-serif;
  user-select: none;
  animation: chatOptPop 0.2s ease-out;
}

@keyframes chatOptPop {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chat-options-titlebar {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-options-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-options-content {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-opt-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #1e293b;
  cursor: pointer;
}

.chat-opt-row input[type="checkbox"] {
  cursor: pointer;
  accent-color: #0284c7;
  width: 14px;
  height: 14px;
}

.chat-opt-hint {
  font-size: 10px;
  color: #64748b;
  margin-top: -5px;
  margin-left: 21px;
  line-height: 1.2;
}

.chat-options-actions {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.chat-clear-btn {
  width: 100%;
  font-size: 11px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  cursor: pointer;
}

.chat-clear-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* System Message On/Off Filter Toggle */
#chat-log.hide-system .chat-msg.system {
  display: none !important;
}

/* Timestamps Display Toggle */
.chat-time {
  display: none;
  font-size: 10px;
  color: #94a3b8;
  margin-right: 4px;
}

#chat-log.show-timestamps .chat-time {
  display: inline;
}

/* ==========================================================================
   Authentic Character Rank Bottom Slim EXP Bar & Character Info Window
   ========================================================================== */

/* 1. Bottom Slim EXP Bar (유저 요청: "맨아래에 얇게 일자로 가로로넣어줘 연한 회색안에 금빛이차게") */
.char-exp-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.45); /* 유저 요청: 검은색 반투명 트랙 */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
  z-index: 1060;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.char-exp-bar-container:hover {
  background: rgba(0, 0, 0, 0.65);
  border-top: 1px solid rgba(254, 240, 138, 0.4);
}

.char-exp-bar-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.char-exp-bar-fill {
  height: 100%;
  width: 0%;
  /* 유저 요청: 너무 진하지 않고 연하고 부드러운 금빛 */
  background: linear-gradient(90deg, #fef9c3 0%, #fef08a 50%, #fde047 100%);
  box-shadow: 0 0 4px rgba(254, 240, 138, 0.6);
  position: relative;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-exp-bar-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  animation: expShimmer 2.5s infinite linear;
}

@keyframes expShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* 유저 요청: "거긴 새내기 0/100은 안써있어도될거같아 경험치차는거만 보는거니까" -> 텍스트 숨김 */
.char-exp-bar-label {
  display: none !important;
}

/* 2. Authentic Character Info Window (자유로운 플로팅 윈도우 - 배경 블러 없음) */
#char-info-modal {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  z-index: 3400 !important;
  display: none;
}

#char-info-modal.active {
  display: block !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.char-info-window {
  position: fixed !important;
  top: 90px;
  left: calc(50% - 215px);
  width: 430px;
  max-width: 96vw;
  /* 사진의 해피시티 시그니처 딥그린/에메랄드 톤 */
  background: linear-gradient(180deg, #1b5e20 0%, #134e1b 40%, #0d3814 100%);
  border: 3px solid #b4832c;
  outline: 1.5px solid #ffd54f;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 0;
  overflow: hidden;
  user-select: none;
  pointer-events: auto !important;
  z-index: 3405 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", Dotum, sans-serif;
  animation: modalPopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.char-info-titlebar {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #b4832c;
  cursor: move;
  user-select: none;
}

.char-info-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.char-info-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.char-info-main-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

/* Left: Avatar Column */
.char-info-avatar-col {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.char-info-avatar-card {
  width: 120px;
  height: 154px;
  background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1.5px solid #ffd54f;
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.char-info-avatar-card canvas {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 2;
}

.char-info-avatar-shadow {
  position: absolute;
  bottom: 12px;
  width: 60px;
  height: 14px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  filter: blur(2px);
  z-index: 1;
}

.char-info-avatar-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 213, 79, 0.5);
  border-radius: 12px;
  padding: 3px 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* Right: Fields Column */
.char-info-fields-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Top Split: ID, 주민등급, 단계 alongside 쪽지가능, 교환가능, 친구가능 */
.char-info-top-split {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.char-info-top-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Bottom Fields: BN, HP, 경험치, 배우자, 자기방 (Full width across fields column) */
.char-info-bottom-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.char-info-field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
}

.char-info-field-row.row-grade {
  height: 28px;
}

.char-info-label {
  width: 44px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Authentic HappyCity Black Box */
.char-info-val-box {
  flex: 1;
  min-width: 0;
  height: 20px;
  background: #000000;
  border: 1px solid #334155;
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
  padding: 0 6px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Grade with Authentic Badge & Yellow Box (사진의 우수시민 박스 재현) */
.char-info-val-box.char-info-val-grade {
  height: 26px;
  background: #000000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
}

.char-info-grade-icon {
  width: 25px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}

.char-info-grade-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #facc15;
  white-space: nowrap;
}

/* EXP Box (HP, BN과 동일하게 깔끔한 좌측 정렬) */
.char-info-exp-box {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
}

.char-info-exp-mini-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

.char-info-exp-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.4), rgba(245, 158, 11, 0.4));
  transition: width 0.3s ease;
}

.char-info-exp-text {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 2px #000000;
}

/* Checkboxes on Right Side (사진 완벽 재현 - 절대 잘리지 않도록 여유폭 지정) */
.char-info-checkboxes {
  width: 82px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  margin: 0;
}

.char-info-chk-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 22px;
  cursor: pointer;
  user-select: none;
}

.char-info-chk-row:nth-child(2) {
  height: 28px; /* 주민등급 행 높이와 완벽 일치 */
}

.char-info-chk-label {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* 해피시티 정통 황금빛 입체 체크박스 (사진 100% 동일) */
.char-info-chk {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 55%, #b45309 100%);
  border: 1.5px solid #78350f;
  border-radius: 2px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

.char-info-chk:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.9));
}

.char-info-chk:not(:checked) {
  background: #111827;
  border-color: #475569;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* 모바일 및 좁은 화면 반응형 대응 */
@media (max-width: 480px) {
  .char-info-window {
    width: 95vw !important;
    left: 2.5vw !important;
    top: 50px !important;
  }
  .char-info-body {
    padding: 10px 10px 12px !important;
    gap: 8px !important;
  }
  .char-info-main-row {
    gap: 8px !important;
  }
  .char-info-avatar-col {
    width: 96px !important;
  }
  .char-info-avatar-card {
    width: 96px !important;
    height: 136px !important;
  }
  .char-info-avatar-card canvas {
    width: 96px !important;
    height: 118px !important;
  }
  .char-info-top-split {
    gap: 6px !important;
  }
  .char-info-checkboxes {
    width: 76px !important;
  }
  .char-info-chk-label {
    font-size: 10.5px !important;
  }
  .char-info-label {
    width: 40px !important;
    font-size: 10.5px !important;
  }
}

/* Authentic Signature Quote Banner (사진 문구 완벽 재현) */
.char-info-quote-banner {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 213, 79, 0.4);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

/* Bottom Action Buttons (칭찬포인트, 가족, 확인) */
.char-info-actions {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 2px;
}

.char-info-btn {
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.08s ease, filter 0.15s ease;
  outline: none;
  white-space: nowrap;
}

.char-info-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.char-info-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 노란색 칭찬포인트 버튼 (사진 재현) */
.char-info-btn.btn-praise {
  background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  color: #422006;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 보라/하늘색 능력 버튼 (토비 전용 해금) */
.char-info-btn.btn-skills {
  background: linear-gradient(180deg, #c084fc 0%, #a855f7 50%, #7e22ce 100%);
  border: 1.5px solid #581c87;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.char-info-btn.btn-skills.btn-locked {
  background: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
  border: 1.5px solid #1e293b;
  color: #cbd5e1;
  opacity: 0.85;
}

.char-info-btn.btn-skills.btn-unlocked {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%);
  border: 1.5px solid #075985;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* 연두색 가족 버튼 (사진 재현) */
.char-info-btn.btn-family {
  background: linear-gradient(180deg, #bbf7d0 0%, #4ade80 50%, #16a34a 100%);
  border: 1.5px solid #166534;
  color: #052e16;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
}

/* 확인/닫기 버튼 */
.char-info-btn.btn-ok {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 50%, #475569 100%);
  border: 1.5px solid #334155;
  color: #ffffff;
  letter-spacing: 2px;
}

/* ==========================================================================
   Skill / Ability Panel Window (시민 능력창 - F3)
   ========================================================================== */
.skill-panel-window {
  position: fixed !important;
  top: 70px;
  left: calc(50% - 280px);
  width: 560px;
  max-width: 96vw;
  max-height: 90vh;
  background: linear-gradient(180deg, #1b5e20 0%, #134e1b 40%, #0d3814 100%);
  border: 3px solid #b4832c;
  outline: 1.5px solid #ffd54f;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 0;
  overflow: hidden;
  user-select: none;
  pointer-events: auto !important;
  z-index: 3450 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", Dotum, sans-serif;
  animation: modalPopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.skill-panel-titlebar {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #b4832c;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.skill-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.skill-title-icon {
  font-size: 16px;
  color: #facc15;
}

.skill-title-sub {
  font-size: 12px;
  color: #86efac;
  font-weight: 600;
}

.skill-panel-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Status Banner */
.skill-status-banner {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}

.skill-status-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-status-grade-wrap {
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: 1px solid #475569;
  border-radius: 4px;
}

.skill-status-grade-img {
  width: 26px;
  height: 23px;
  object-fit: contain;
  image-rendering: pixelated;
}

.skill-status-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-status-nick {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.skill-grade-badge {
  font-size: 12px;
  font-weight: 700;
  color: #facc15;
}

.skill-level-text {
  font-size: 11px;
  font-weight: 700;
  background: #1e293b;
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #0284c7;
}

.skill-status-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.skill-status-count-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.skill-count-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.skill-count-val {
  font-size: 13px;
  color: #cbd5e1;
  background: #0f172a;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #334155;
}

.skill-count-val b {
  color: #4ade80;
  font-size: 14px;
}

/* Tabs Bar */
.skill-tabs-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.skill-tab {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #334155;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.1s ease;
}

.skill-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.skill-tab.active {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  border-color: #78350f;
  color: #451a03;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Skill Grid Container */
.skill-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.skill-grid-container::-webkit-scrollbar {
  width: 6px;
}
.skill-grid-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}
.skill-grid-container::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
.skill-grid-container::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Skill Card */
.skill-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid #334155;
  border-radius: 6px;
  padding: 5px 6px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.12s ease, background 0.12s ease;
}

.skill-card:hover {
  transform: translateY(-1px);
  border-color: #64748b;
  background: rgba(30, 41, 59, 0.9);
}

.skill-card.selected {
  border-color: #facc15 !important;
  background: rgba(30, 41, 59, 1) !important;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.skill-card.locked {
  background: rgba(15, 23, 42, 0.4);
  border-color: #1e293b;
}

.skill-card-icon-box {
  width: 38px;
  height: 38px;
  background: #000000;
  border: 1.5px solid #475569;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

.skill-card.unlocked .skill-card-icon-box {
  border-color: #10b981;
}

.skill-card-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* Grayscale styling for locked skills as explicitly requested */
.skill-card-icon-box.grayscale .skill-card-img,
.skill-detail-img.grayscale {
  filter: grayscale(100%) brightness(0.65) opacity(0.5);
}

.skill-card-icon-box.colored .skill-card-img,
.skill-detail-img.colored {
  filter: none;
}

.skill-lock-overlay {
  position: absolute;
  right: 1px;
  bottom: 1px;
  font-size: 10px;
  filter: drop-shadow(0 1px 1px #000000);
}

.skill-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.skill-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.skill-card-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card.locked .skill-card-name {
  color: #94a3b8;
}

.skill-card-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-unlocked {
  background: #14532d;
  color: #4ade80;
  border: 1px solid #16a34a;
}

.badge-locked {
  background: #1e293b;
  color: #64748b;
  border: 1px solid #334155;
}

.skill-card-grade-label {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-card.unlocked .skill-card-grade-label {
  color: #38bdf8;
}

/* Bottom Skill Detail Preview */
.skill-detail-panel {
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9);
}

.skill-detail-slot {
  width: 44px;
  height: 44px;
  background: #000000;
  border: 2px solid #b4832c;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

.skill-detail-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

.skill-detail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.skill-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-detail-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}

.skill-detail-req {
  font-size: 11px;
  color: #facc15;
  font-weight: 600;
}

.skill-detail-hp {
  font-size: 11px;
  font-weight: 700;
  color: #fca5a5;
  background: rgba(185, 28, 28, 0.35);
  border: 1px solid #ef4444;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.skill-detail-status {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.status-unlocked {
  background: #14532d;
  color: #4ade80;
  border: 1px solid #22c55e;
}

.status-locked {
  background: #450a0a;
  color: #f87171;
  border: 1px solid #dc2626;
}

.skill-detail-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.35;
}

.skill-detail-tip {
  font-size: 10px;
  color: #94a3b8;
  font-style: italic;
}

/* Target Ability Input Container */
.skill-target-container {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #334155;
}

.skill-target-label {
  font-size: 11px;
  font-weight: bold;
  color: #38bdf8;
  white-space: nowrap;
}

.skill-target-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 3px;
  padding: 3px 6px;
  color: #ffffff;
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.skill-target-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

/* Action Buttons */
.skill-panel-actions {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.skill-btn.btn-close-skill {
  min-width: 90px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 50%, #475569 100%);
  border: 1.5px solid #334155;
  color: #ffffff;
  border-radius: 4px;
  padding: 5px 24px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.skill-btn.btn-close-skill:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.skill-btn.btn-close-skill:active {
  transform: translateY(1px);
}

.skill-btn.btn-use-skill {
  min-width: 95px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
  border: 1.5px solid #60a5fa;
  color: #ffffff;
  border-radius: 4px;
  padding: 5px 22px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
}

.skill-btn.btn-use-skill:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.6);
}

.skill-btn.btn-use-skill:active {
  transform: translateY(1px);
}

.skill-btn.btn-use-skill:disabled {
  background: #475569;
  border-color: #64748b;
  color: #94a3b8;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
  transform: none;
}

/* ==========================================================================
   Other Player Character Info Window (상대방 캐릭터 정보창)
   ========================================================================== */
#other-char-info-modal {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  z-index: 3450 !important;
  display: none;
}

#other-char-info-modal.active {
  display: block !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.other-char-info-window {
  position: fixed !important;
  top: 95px;
  left: calc(50% - 200px);
  width: 400px;
  max-width: 96vw;
  background: linear-gradient(180deg, #1b5e20 0%, #134e1b 40%, #0d3814 100%);
  border: 3px solid #b4832c;
  outline: 1.5px solid #ffd54f;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 0;
  overflow: hidden;
  user-select: none;
  pointer-events: auto !important;
  z-index: 3455 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", Dotum, sans-serif;
  animation: modalPopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.other-char-info-titlebar {
  background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #b4832c;
  cursor: move;
  user-select: none;
}

.other-char-info-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.other-char-info-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.other-char-info-main-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

/* Left: Avatar Column */
.other-char-info-avatar-col {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.other-char-info-avatar-card {
  width: 120px;
  height: 154px;
  background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1.5px solid #ffd54f;
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.other-char-info-avatar-card canvas {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 2;
}

.other-char-info-avatar-shadow {
  position: absolute;
  bottom: 12px;
  width: 60px;
  height: 14px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  filter: blur(2px);
  z-index: 1;
}

.other-char-info-avatar-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 213, 79, 0.5);
  border-radius: 12px;
  padding: 3px 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* Right: Fields & Buttons Column */
.other-char-info-fields-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.other-char-info-top-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.other-char-info-field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
}

.other-char-info-field-row.row-grade {
  height: 26px;
}

.other-char-info-label {
  width: 48px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  flex-shrink: 0;
}

.other-char-info-val-box {
  flex: 1;
  min-width: 0;
  height: 20px;
  background: #000000;
  border: 1px solid #334155;
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
  padding: 0 6px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.other-char-info-field-row.row-grade {
  height: 32px;
}

/* 원작 사진 100% 동일: 큼직하고 선명한 등급 엠블럼 사각 박스 */
.other-char-info-grade-emblem-wrap {
  width: 34px;
  height: 30px;
  background: #000000;
  border: 1.5px solid #22c55e;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.other-char-info-grade-icon {
  width: 30px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
}

.other-char-info-val-box.other-char-info-val-grade {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.other-char-info-grade-text {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* Right Side Vertical Buttons List (원작 사진 완벽 재현) */
.other-char-info-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  width: 100%;
}

.other-char-btn {
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.08s ease, filter 0.15s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.other-char-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.other-char-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 1. 잠금/비활성 버튼 (교환하기, 쪽지보내기) */
.other-char-btn.btn-locked {
  background: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
  border: 1.5px solid #1e293b;
  color: #cbd5e1;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

/* 2. 황금빛 볼록 버튼 (칭찬하기, 친구신청) */
.other-char-btn.btn-gold {
  background: linear-gradient(180deg, #fde047 0%, #eab308 50%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  color: #422006;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

/* 3. 칭찬포인트 버튼 (사진 속 금빛 테두리 박스 버튼) */
.other-char-btn.btn-gold-outline {
  background: linear-gradient(180deg, #052e16 0%, #022c22 100%);
  border: 1.5px solid #eab308;
  color: #fef08a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 0 4px rgba(234, 179, 8, 0.2);
  letter-spacing: 0.5px;
}

/* Iconic Signature Quote Banner */
.other-char-info-quote-banner {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(255, 213, 79, 0.4);
  border-radius: 6px;
  padding: 7px 10px;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

/* Bottom Action Row: Close button (사진 속 타원형 골드 버튼) */
.other-char-info-actions {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.other-char-btn.btn-close-wide {
  width: auto;
  min-width: 110px;
  background: linear-gradient(180deg, #fde047 0%, #eab308 50%, #b45309 100%);
  border: 1.5px solid #78350f;
  border-radius: 14px;
  color: #451a03;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 28px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
}

/* 반응형 대응 */
@media (max-width: 480px) {
  .other-char-info-window {
    width: 95vw !important;
    left: 2.5vw !important;
    top: 55px !important;
  }
  .other-char-info-body {
    padding: 10px !important;
    gap: 8px !important;
  }
  .other-char-info-avatar-col {
    width: 96px !important;
  }
  .other-char-info-avatar-card {
    width: 96px !important;
    height: 136px !important;
  }
  .other-char-info-avatar-card canvas {
    width: 96px !important;
    height: 118px !important;
  }
}

/* ========================================================
   칭찬포인트 보기 패널 (Praise Point View Panel)
   ======================================================== */
.praise-point-window {
  width: 250px;
  background: linear-gradient(180deg, #053b1b 0%, #032b13 45%, #011a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3550;
  overflow: hidden;
  user-select: none;
}

.praise-point-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
}

.praise-point-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.praise-point-body {
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.praise-point-content-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.praise-point-coin-img {
  width: 20px;
  height: 17px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
  flex-shrink: 0;
}

.praise-point-target-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.praise-point-target-text span {
  color: #fde047;
}

.praise-point-score-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin: 2px 0 6px;
}

.praise-point-score-num {
  font-size: 26px;
  font-weight: 900;
  color: #ea580c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 12px rgba(234, 88, 12, 0.4);
  letter-spacing: 1px;
}

.praise-point-score-unit {
  font-size: 15px;
  font-weight: 800;
  color: #ea580c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.praise-point-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ==========================================================================
   Praise Message Modal (칭찬 메시지 입력창)
   ========================================================================== */
.praise-message-window {
  width: 320px;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(34, 197, 94, 0.25);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3550;
  overflow: hidden;
  user-select: none;
}

.praise-message-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
}

.praise-message-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.praise-message-body {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.praise-message-guide {
  display: flex;
  align-items: center;
  gap: 6px;
}

.praise-msg-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.praise-msg-guide-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.praise-msg-guide-text span {
  color: #fde047;
}

.praise-message-input-wrap {
  width: 100%;
}

.praise-message-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: #011706;
  border: 1.5px solid #22c55e;
  border-radius: 4px;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.praise-message-input:focus {
  border-color: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.praise-message-input::placeholder {
  color: #86efac;
  font-size: 12px;
  opacity: 0.7;
}

.praise-message-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* 칭찬 채팅 메시지 전용 황금빛 스타일 */
.chat-msg .system-tag.praise-tag {
  color: #f59e0b;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.chat-msg.praise-msg {
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* 첫방문 환영 채팅 메시지 전용 핑크빛 하트 스타일 */
.chat-msg .system-tag.welcome-tag {
  color: #f472b6 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.5);
}

.chat-msg.welcome-msg {
  color: #fbcfe8 !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* 도전! OXT 퀴즈 전광보이 골드/옐로우 테마 스타일 */
.chat-msg .system-tag.quiz-tag {
  color: #fbbf24 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.chat-msg.quiz-msg {
  color: #fef08a !important;
  font-weight: 600;
  background: rgba(234, 179, 8, 0.12);
  border-left: 3px solid #eab308;
  padding-left: 5px;
  margin: 2px 0;
  border-radius: 3px;
}

/* 특별말투 (I00092_0) 채팅창 노란 글씨 스타일 */
.chat-msg.special-tone-msg .chat-text,
.chat-text.special-tone {
  color: #fde047 !important; /* Authentic Vibrant Yellow */
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   Friend UI & 1:1 PM Chat Modal Styles (원작 JoyCity 디자인 100% 재현)
   ========================================================================== */

/* 내정보창 속 친구 버튼 */
.char-info-btn.btn-friend {
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 50%, #059669 100%);
  border: 1.5px solid #065f46;
  color: #022c22;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  font-weight: 800;
  letter-spacing: 1px;
}

/* 친구 목록 창 */
.friend-window {
  width: 312px;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(34, 197, 94, 0.25);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3550;
  overflow: hidden;
  user-select: none;
}

.friend-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
}

.friend-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  flex: 1;
  text-align: center;
}

.friend-body {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 친구 테이블 헤더 (원작 오렌지/브라운 톤 바) */
.friend-table-header {
  display: flex;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
  border: 1.5px solid #78350f;
  border-radius: 4px 4px 0 0;
  height: 24px;
  align-items: center;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}

.friend-table-header .col-id {
  flex: 1.25;
  text-align: center;
  border-right: 1px solid #78350f;
}

.friend-table-header .col-intimacy {
  flex: 1.05;
  text-align: center;
  border-right: 1px solid #78350f;
  color: #fef08a;
}

.friend-table-header .col-category {
  flex: 0.95;
  text-align: center;
  color: #fef08a;
}

/* 10개 행 리스트 컨테이너 (원작 라이트 올리브 그린) */
.friend-rows-container {
  height: 260px;
  background: #788a60;
  border: 1.5px solid #4a5738;
  border-top: none;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.friend-table-row {
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background 0.12s;
  user-select: none;
}

.friend-table-row:hover {
  background: rgba(255, 255, 255, 0.15);
}

.friend-table-row.selected {
  background: rgba(254, 240, 138, 0.45);
}

.friend-radio {
  margin: 0 4px 0 2px;
  cursor: pointer;
}

.friend-name {
  flex: 1.25;
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}

.friend-online-dot {
  font-size: 9px;
  line-height: 1;
}

.friend-online-dot.online {
  color: #16a34a;
}

.friend-online-dot.offline {
  color: #94a3b8;
}

/* 친밀도 둥근 음각 캡슐 */
.friend-intimacy-pill {
  flex: 1.05;
  height: 18px;
  background: #62724c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 4px;
  letter-spacing: 0.5px;
}

.friend-category-text {
  flex: 0.95;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.friend-empty-msg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-align: center;
  padding: 10px;
}

/* 페이지네이션 바 */
.friend-pagination-row {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  margin-top: 2px;
}

.friend-page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.friend-page-arrow {
  width: 22px;
  height: 20px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1px solid #78350f;
  border-radius: 3px;
  color: #451a03;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-page-arrow:active {
  transform: translateY(1px);
}

.friend-page-text {
  font-size: 11px;
  font-weight: 800;
  color: #fde047;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.friend-sub-btn {
  height: 22px;
  padding: 0 8px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1px solid #78350f;
  border-radius: 3px;
  color: #451a03;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.friend-sub-btn:active {
  transform: translateY(1px);
}

/* 액션 버튼 행 */
.friend-actions-row {
  display: flex;
  gap: 4px;
  justify-content: space-between;
  margin-top: 3px;
}

.friend-btn {
  height: 24px;
  flex: 1;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  border-radius: 4px;
  color: #422006;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.friend-btn:active {
  transform: translateY(1px);
}

.friend-btn.btn-locked {
  background: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
  border: 1.5px solid #1e293b;
  color: #cbd5e1;
  text-shadow: none;
}

/* 1:1 대화창 (PM Chat Modal) */
.pm-chat-window {
  width: 320px;
  height: 380px;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(34, 197, 94, 0.25);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3600;
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.pm-chat-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
  flex-shrink: 0;
}

.pm-chat-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pm-chat-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  min-height: 0;
}

.pm-chat-info-bar {
  background: rgba(0, 35, 10, 0.8);
  border: 1px solid #166534;
  border-radius: 4px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #86efac;
  flex-shrink: 0;
}

.pm-chat-info-bar .pm-chat-target {
  font-weight: 800;
  color: #fde047;
}

.pm-chat-info-bar .pm-chat-intimacy b {
  color: #fb923c;
}

.pm-chat-info-bar .pm-chat-category {
  color: #a7f3d0;
  font-weight: 700;
}

.pm-chat-log {
  flex: 1;
  background: #011706;
  border: 1px solid #15803d;
  border-radius: 4px;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  user-select: text;
}

.pm-chat-bubble {
  max-width: 85%;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.pm-chat-bubble.mine {
  align-self: flex-end;
  background: #166534;
  color: #ffffff;
  border: 1px solid #22c55e;
}

.pm-chat-bubble.other {
  align-self: flex-start;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
}

.pm-chat-bubble .pm-time {
  font-size: 9.5px;
  opacity: 0.65;
  margin-left: 4px;
}

.pm-chat-input-bar {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pm-chat-input {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  background: #011706;
  border: 1.5px solid #22c55e;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
}

.pm-chat-input:focus {
  border-color: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

/* 친구 신청 수락/거절 팝업창 */
.friend-request-window {
  width: 280px;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(34, 197, 94, 0.3);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3800;
  overflow: hidden;
  user-select: none;
}

.friend-request-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
}

.friend-request-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.friend-request-body {
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.friend-request-icon {
  font-size: 26px;
}

.friend-request-msg {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.friend-request-msg span {
  color: #fde047;
  font-weight: 800;
}

.friend-request-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

/* 1:1 대화 도착 알림 팝업창 */
.pm-notice-window {
  width: 290px;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(34, 197, 94, 0.3);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3820;
  overflow: hidden;
  user-select: none;
}

.pm-notice-titlebar {
  height: 30px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: move;
}

.pm-notice-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pm-notice-body {
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.pm-notice-icon {
  font-size: 26px;
}

.pm-notice-msg {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.pm-notice-msg span {
  color: #fde047;
  font-weight: 800;
}

.pm-notice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.pm-notice-actions .other-char-btn {
  min-width: 70px;
}

/* ==========================================================================
   HappyCity In-Game Alert & Notice Modal (정통 인게임 알림 패널)
   ========================================================================== */
.game-alert-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.game-alert-window {
  width: 330px;
  max-width: 90vw;
  background: radial-gradient(circle at 50% 10%, #064e26 0%, #032b12 80%, #021a0a 100%);
  border: 2px solid #22c55e;
  border-radius: 9px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 20px rgba(34, 197, 94, 0.4);
  font-family: 'Pretendard', sans-serif;
  color: #ffffff;
  overflow: hidden;
  user-select: none;
  animation: gameAlertPopIn 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gameAlertPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.game-alert-titlebar {
  height: 32px;
  background: linear-gradient(180deg, #15803d 0%, #166534 60%, #14532d 100%);
  border-bottom: 1.5px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: move;
}

.game-alert-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-alert-body {
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.game-alert-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.game-alert-msg {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.6;
  white-space: pre-line;
  word-break: keep-all;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  max-height: 240px;
  overflow-y: auto;
  padding: 0 4px;
}

.game-alert-msg .highlight-gold {
  color: #fde047;
  font-weight: 800;
}

.game-alert-msg .highlight-green {
  color: #4ade80;
  font-weight: 800;
}

.game-alert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.game-alert-btn {
  min-width: 90px;
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, filter 0.08s ease;
}

.game-alert-btn:hover {
  filter: brightness(1.1);
}

.game-alert-btn:active {
  transform: scale(0.96);
}

.game-alert-btn.btn-gold {
  background: linear-gradient(180deg, #fde047 0%, #eab308 50%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  color: #422006;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.game-alert-btn.btn-cancel {
  background: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
  border: 1.5px solid #1e293b;
  color: #cbd5e1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   도전! OXT 퀴즈 정통 전광판 (원작 JoyCity/HappyCity 100% 실기 스크린샷 완벽 재현)
   ========================================================================== */
#ox-quiz-panel.ox-authentic-window {
  position: absolute;
  top: 50px;
  left: 20px;
  width: 220px;
  z-index: 85;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.85));
}

/* 상단 황금 고리 장식 */
.ox-hanging-bracket {
  width: 32px;
  height: 12px;
  background: linear-gradient(180deg, #d4a337 0%, #926615 100%);
  border: 1.5px solid #5c3b04;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  position: relative;
  margin-bottom: -1px;
  z-index: 2;
  box-shadow: inset 0 1px 0 #fef08a;
}

.ox-hanging-bracket::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 5px;
  background: #020617;
  border-radius: 2px;
}

/* 외곽 황금 테두리 프레임 */
.ox-outer-frame {
  width: 100%;
  background: linear-gradient(180deg, #d8a53a 0%, #ad7a1e 50%, #87570b 100%);
  border: 2px solid #5a3803;
  border-radius: 3px;
  padding: 3px;
  box-shadow: inset 0 1px 0 #fef08a, inset 0 -1px 0 #452402, 0 4px 14px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 상단 크림색 타이틀 바 (OX Quiz) */
.ox-title-bar {
  background: #ebe2cf;
  border: 1px solid #9c7e4e;
  border-bottom: 2px solid #6c4004;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: move;
}

.ox-title-logo {
  font-family: 'Malgun Gothic', 'Dotum', sans-serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ox-title-o {
  color: #e11d48;
}

.ox-title-x {
  color: #2563eb;
  margin-right: 4px;
}

.ox-title-quiz {
  color: #78350f;
}

.ox-title-close {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #78350f;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  padding: 1px 3px;
}
.ox-title-close:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* 칠판 영역 (짙은 초록색) */
.ox-chalkboard {
  background: #083313;
  border: 2px solid #041d0b;
  border-radius: 1px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-family: 'Dotum', 'Malgun Gothic', sans-serif;
  padding: 8px 8px 10px 8px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

/* 문제 번호 & 우측 상단 네온 그린 카운트다운 타이머 (스크린샷 100% 동일) */
.ox-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.ox-q-num {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  padding-top: 2px;
}

.ox-countdown-digit {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: #22c55e; /* 선명한 네온 그린 */
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  font-family: 'Arial', sans-serif;
}

.ox-countdown-digit.urgent {
  color: #ef4444 !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8) !important;
  animation: oxUrgentBlink 0.5s infinite alternate ease-in-out;
}

@keyframes oxUrgentBlink {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* 문제 본문 텍스트 (스크린샷처럼 좌측 정렬, 줄바꿈) */
.ox-q-body {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: #ffffff;
  text-align: left;
  margin-top: 8px;
  word-break: break-all;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  flex: 1;
}

/* 정답 발표 화면 (스크린샷 1) */
.ox-reveal-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

.ox-reveal-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.ox-reveal-middle {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 10px;
}

.ox-side-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ox-side-name {
  font-size: 12px;
  color: #e2e8f0;
}

.ox-side-char {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.ox-side-char.highlight-o {
  color: #38bdf8;
  text-shadow: 0 0 10px #38bdf8;
  transform: scale(1.3);
}

.ox-side-char.highlight-x {
  color: #f87171;
  text-shadow: 0 0 10px #f87171;
  transform: scale(1.3);
}

.ox-reveal-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.35;
  margin-top: 4px;
}

/* 하단 직사각형 박스 (스크린샷 1, 2 공통) */
.ox-bottom-strip {
  background: #082911;
  border: 1.5px solid #04190b;
  border-radius: 1px;
  padding: 3px 4px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
  text-align: center;
  font-family: 'Dotum', 'Malgun Gothic', sans-serif;
  font-size: 11.5px;
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.ox-board-btn-start {
  margin-top: 8px;
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border: 1.5px solid #34d399;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.ox-board-btn-start:hover {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
}

/* ==========================================================================
   모바일 세로 모드 (Portrait Mobile) 전용 가로형 상단 고정 OX 퀴즈 패널
   - PC 및 가로 모드는 원본(좌측 매달린 간판) 그대로 유지
   - 세로 모바일만 상단(좌표 바 바로 아래)에 가로로 슬림하게 고정
   - 채팅창(z-index: 100~500)보다 항상 위에 노출 (z-index: 2000 !important)
   ========================================================================== */
@media (max-width: 768px) and (orientation: portrait), (max-width: 500px) {
  #ox-quiz-panel.ox-authentic-window {
    position: fixed !important;
    top: 26px !important;
    left: 6px !important;
    right: 6px !important;
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
    z-index: 2000 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.85);
  }

  #ox-quiz-panel .ox-hanging-bracket {
    display: none !important;
  }

  #ox-quiz-panel .ox-outer-frame {
    padding: 2px !important;
    gap: 2px !important;
  }

  #ox-quiz-panel .ox-title-bar {
    height: 18px !important;
    cursor: default !important;
  }

  #ox-quiz-panel .ox-title-logo {
    font-size: 12px !important;
  }

  #ox-quiz-panel .ox-title-close {
    font-size: 10px !important;
    padding: 0 4px !important;
  }

  #ox-quiz-panel .ox-chalkboard {
    min-height: auto !important;
    padding: 4px 8px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  #ox-quiz-panel .ox-board-header {
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 46px !important;
    gap: 1px !important;
  }

  #ox-quiz-panel .ox-q-num {
    font-size: 11px !important;
    white-space: nowrap !important;
    padding-top: 0 !important;
  }

  #ox-quiz-panel .ox-countdown-digit {
    font-size: 20px !important;
    line-height: 1 !important;
  }

  #ox-quiz-panel .ox-q-body {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin-top: 0 !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
  }

  #ox-quiz-panel #ox-idle-action-box {
    margin: 0 !important;
  }

  #ox-quiz-panel .ox-board-btn-start {
    margin-top: 0 !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  #ox-quiz-panel .ox-reveal-section {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex: 1 !important;
    text-align: left !important;
  }

  #ox-quiz-panel .ox-reveal-title {
    font-size: 11px !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }

  #ox-quiz-panel .ox-reveal-middle {
    margin-bottom: 0 !important;
    gap: 10px !important;
    width: auto !important;
  }

  #ox-quiz-panel .ox-side-col {
    flex-direction: row !important;
    gap: 4px !important;
    align-items: center !important;
  }

  #ox-quiz-panel .ox-side-name {
    font-size: 11px !important;
  }

  #ox-quiz-panel .ox-side-char {
    font-size: 14px !important;
  }

  #ox-quiz-panel .ox-reveal-desc {
    font-size: 10px !important;
    margin-top: 0 !important;
    max-width: 140px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #ox-quiz-panel .ox-bottom-strip {
    padding: 2px 4px !important;
    font-size: 10.5px !important;
  }
}

/* ==========================================================================
   Authentic Novice Guide Window (초보자 가이드 1~10단계)
   ========================================================================== */
.novice-guide-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: auto;
}

.novice-guide-window {
  width: 580px;
  max-width: 95vw;
  height: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #002b06;
  border: 2px solid #166534;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 12px rgba(34, 197, 94, 0.3);
  overflow: hidden;
  position: relative;
  font-family: 'Malgun Gothic', 'Dotum', sans-serif;
  user-select: none;
}

.novice-guide-titlebar {
  background: linear-gradient(180deg, #065f46 0%, #047857 50%, #064e3b 100%);
  border-bottom: 2px solid #10b981;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
  height: 32px;
}

.novice-guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-title-icon {
  font-size: 15px;
}

.guide-title-text {
  font-size: 13.5px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #000000;
}

.novice-guide-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #011c05;
}

/* Sidebar: Stages List */
.novice-guide-sidebar {
  width: 155px;
  flex-shrink: 0;
  background: #001704;
  border-right: 1px solid #14532d;
  display: flex;
  flex-direction: column;
}

.novice-sidebar-header {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #86efac;
  background: rgba(22, 101, 52, 0.4);
  text-align: center;
  border-bottom: 1px solid #14532d;
  letter-spacing: 0.5px;
}

.novice-stage-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}

.novice-stage-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  font-family: inherit;
}

.novice-stage-item:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #ffffff;
}

.novice-stage-item.active {
  background: linear-gradient(90deg, #166534, #15803d);
  border-color: #4ade80;
  color: #ffffff;
  font-weight: bold;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.novice-stage-item.done .stage-item-icon {
  color: #4ade80;
  font-weight: bold;
}

.novice-stage-item.in-progress .stage-item-icon {
  color: #facc15;
}

.novice-stage-item.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.stage-item-icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
}

.stage-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novice-sidebar-footer {
  padding: 6px 8px;
  font-size: 10.5px;
  text-align: center;
  color: #fde047;
  font-weight: bold;
  border-top: 1px solid #14532d;
  background: rgba(0, 0, 0, 0.4);
}

/* Main Content Area */
.novice-guide-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 14px;
  background: #022c09;
}

.novice-main-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #166534;
}

.novice-step-badge {
  background: #15803d;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #4ade80;
  white-space: nowrap;
}

.novice-main-title {
  font-size: 13.5px;
  font-weight: bold;
  color: #facc15;
  flex: 1;
  text-shadow: 1px 1px 2px #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novice-reward-pill {
  font-size: 11px;
  font-weight: bold;
  color: #86efac;
  background: rgba(34, 197, 94, 0.2);
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid #22c55e;
  white-space: nowrap;
}

.novice-reward-pill.done {
  color: #94a3b8;
  background: rgba(100, 116, 139, 0.2);
  border-color: #64748b;
}

.novice-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.guide-card {
  background: rgba(0, 20, 4, 0.65);
  border: 1px solid #14532d;
  border-radius: 6px;
  padding: 12px 14px;
}

.guide-lead {
  font-size: 12.5px;
  line-height: 1.6;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.guide-item-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-item {
  font-size: 12px;
  line-height: 1.65;
  color: #cbd5e1;
}

.guide-pill-key {
  display: inline-block;
  background: #1e293b;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}

.guide-pill-menu {
  display: inline-block;
  background: #0f172a;
  border: 1px solid #facc15;
  color: #fde047;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.guide-dot {
  color: #4ade80;
  margin-right: 4px;
  font-weight: bold;
}

/* Footer Navigation & Actions */
.novice-main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #166534;
  gap: 8px;
}

.novice-btn-nav {
  padding: 4px 12px;
  font-size: 11.5px;
  height: 30px;
}

.novice-btn-action {
  padding: 6px 20px;
  font-size: 12.5px;
  font-weight: bold;
  height: 34px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.novice-btn-action.ready {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
  border: 1.5px solid #fde047 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
  cursor: pointer;
}

.novice-btn-action.ready:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%) !important;
  transform: translateY(-1px);
}

.novice-btn-action.completed {
  background: #1e293b !important;
  border: 1px solid #475569 !important;
  color: #94a3b8 !important;
  cursor: default;
}

.novice-btn-action.locked {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

/* Dedicated Small Confirmation Popup Modal */
.guide-confirm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: 6px;
}

.guide-confirm-window {
  width: 320px;
  background: #002b06;
  border: 2px solid #22c55e;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: popIn 0.15s ease;
}

.guide-confirm-titlebar {
  background: linear-gradient(180deg, #065f46 0%, #064e3b 100%);
  border-bottom: 1.5px solid #10b981;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 26px;
}

.guide-confirm-title {
  font-size: 12px;
  font-weight: bold;
  color: #ffffff;
}

.guide-confirm-body {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #011c05;
}

.guide-confirm-icon {
  font-size: 26px;
}

.guide-confirm-msg {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 4px;
}

.guide-confirm-sub {
  font-size: 11px;
  color: #86efac;
  line-height: 1.4;
}

.guide-confirm-actions {
  padding: 8px 14px;
  background: #002306;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #166534;
}







