:root {
  --neon-pink: #ff2a85;
  --neon-cyan: #00f0ff;
  --neon-gold: #ffb800;
  --neon-green: #2ee59d;
  --bg-deep: #140726;
  --panel-bg: rgba(20, 7, 38, 0.76);
  --panel-border: rgba(0, 240, 255, 0.35);
  --text-main: #f8f5ff;
  --text-muted: #c7b8e6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* 토스 인앱 환경과 일반 웹 환경 격리 클래스 */
html.is-toss .web-only-element,
body.is-toss .web-only-element,
.apps-in-toss .web-only-element {
  display: none !important;
}

html.pure-web .toss-only-element,
body.pure-web .toss-only-element,
.not-toss .toss-only-element {
  display: none !important;
}

.hidden {
  display: none !important;
}

/* 3D 캔버스 및 말풍선 레이어 */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#bubbles-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

/* 3D 아바타 머리 위 닉네임 및 말풍선 */
.world-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  will-change: left, top;
}

.name-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20, 7, 38, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.name-badge.is-self {
  border-color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 42, 133, 0.45);
}

.name-badge.is-npc {
  border-color: rgba(255, 184, 0, 0.55);
  color: #ffe8a3;
}

.name-badge.loot-cash {
  background: rgba(10, 28, 22, 0.88);
  border: 1.5px solid #2ee59d;
  color: #8affcf;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(46, 229, 157, 0.45);
}

.name-badge.loot-weapon {
  background: rgba(34, 12, 26, 0.9);
  border: 1.5px solid #ff2a85;
  color: #ffd166;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.45);
}

.name-badge.loot-medkit {
  background: rgba(38, 10, 20, 0.9);
  border: 1.5px solid #ff4d79;
  color: #ffe4ec;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(255, 77, 121, 0.5);
}

.world-hp-bar {
  width: 58px;
  height: 6px;
  border-radius: 999px;
  background: rgba(12, 8, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.world-hp-fill {
  height: 100%;
  width: 100%;
  background: #2ee59d;
  transition: width 0.14s ease, background-color 0.2s ease;
}

.damage-pop {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 900;
  color: #ff4d6d;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  white-space: nowrap;
  animation: dmgPopUp 0.65s ease-out forwards;
}

.heal-pop {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 900;
  color: #2ee59d;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.92);
  pointer-events: none;
  white-space: nowrap;
  animation: dmgPopUp 0.72s ease-out forwards;
}

@keyframes dmgPopUp {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -22px) scale(0.95);
  }
}

.hud-hp-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hud-hp-label {
  font-size: 10px;
  font-weight: 800;
  color: #8affcf;
  letter-spacing: 0.4px;
}

.hud-hp-track {
  width: 54px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hud-hp-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: #2ee59d;
  transition: width 0.14s ease, background-color 0.2s ease;
}

.hud-hp-text {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  min-width: 22px;
  text-align: right;
}

.name-badge.is-police {
  background: rgba(11, 29, 72, 0.9);
  border-color: rgba(0, 240, 255, 0.85);
  color: #9bf6ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.name-badge.is-gang {
  background: rgba(58, 10, 48, 0.9);
  border-color: rgba(255, 0, 85, 0.85);
  color: #ffb3d1;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.38);
}

.speech-bubble {
  position: relative;
  max-width: 195px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #1a0b2e;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  text-align: center;
  box-shadow: 0 4px 16px rgba(255, 42, 133, 0.35), 0 0 0 1.5px var(--neon-pink);
  animation: bubblePop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.96);
}

@keyframes bubblePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.86);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 모달 공통 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 42, 133, 0.28), rgba(14, 5, 28, 0.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 오프닝 로고 스플래시 오버레이 (스플래시 이미지 + 로딩바 전용) */
.opening-splash {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000000;
  opacity: 1;
  visibility: visible;
  cursor: pointer;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
}

.opening-splash.opening-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.opening-splash-img {
  width: min(82vw, 340px);
  max-height: 58vh;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.opening-loader-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 8, 34, 0.88);
  border: 1px solid rgba(255, 42, 133, 0.42);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

.opening-loader-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.opening-loading-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #e6fbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.opening-loading-pct {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--neon-cyan);
  white-space: nowrap;
}

.opening-loader-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.opening-loading-fill {
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2a85, #00f0ff);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.72);
  transition: width 0.22s ease-out;
}

#entry-modal:not(.opening-done) .entry-card {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
}

#entry-modal.opening-done .entry-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry-card {
  width: 100%;
  max-width: 455px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(31, 12, 58, 0.94), rgba(16, 6, 32, 0.96));
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 36px rgba(255, 42, 133, 0.32), inset 0 0 24px rgba(0, 240, 255, 0.08);
  touch-action: pan-y;
}

.brand-badge {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  margin-bottom: 8px;
}

.neon-logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2.5px;
  background: linear-gradient(90deg, #ff2a85, #ff99c8 50%, #00f0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(255, 42, 133, 0.45);
  margin-bottom: 4px;
}

.entry-subtitle {
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 11px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 5px;
}

#nickname-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(10, 4, 22, 0.85);
  border: 1px solid rgba(255, 42, 133, 0.45);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#nickname-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.nickname-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.nickname-row #nickname-input {
  flex: 1;
  min-width: 0;
}

.random-name-btn {
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.14);
  color: #dffbff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.random-name-btn:active {
  transform: scale(0.96);
}

.assign-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.assign-mode-btn {
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(10, 4, 22, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #e9e2f8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}

.assign-mode-btn.selected {
  border-color: var(--neon-pink);
  background: rgba(255, 42, 133, 0.18);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.35);
}

.manual-channel-wrap {
  margin-top: 8px;
}

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

.channel-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(10, 4, 22, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.channel-btn.selected {
  border-color: var(--neon-pink);
  background: rgba(255, 42, 133, 0.18);
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.35);
}

.channel-name {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.channel-count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.char-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.char-type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(10, 4, 22, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.char-type-btn.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.char-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.char-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

.color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.color-swatch.selected {
  transform: scale(1.14);
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.8);
}

.controls-guide {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2px;
  margin-bottom: 0;
}

.guide-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-gold);
  margin-bottom: 8px;
}

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-item {
  font-size: 12px;
  color: #e9e2f8;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.key-cap {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 42, 133, 0.2);
  border: 1px solid rgba(255, 42, 133, 0.55);
  color: #ffd1e6;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-neon-btn {
  width: 100%;
  padding: 13px 14px;
  margin-top: 6px;
  margin-bottom: 0;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #ff2a85, #d91b7a, #00b8d9);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255, 42, 133, 0.45);
  transition: transform 0.12s, filter 0.15s;
}

.asset-loading-box {
  margin-top: 4px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(10, 4, 22, 0.78);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.asset-loading-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.asset-loading-label {
  font-size: 11px;
  font-weight: 700;
  color: #dffbff;
}

.asset-loading-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.asset-loading-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00f0ff, #ff2a85);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  transition: width 0.2s ease-out;
}

.asset-loading-box.ready {
  border-color: rgba(46, 229, 157, 0.55);
}

.asset-loading-box.ready .asset-loading-label {
  color: #9effd8;
}

.asset-loading-box.ready .asset-loading-fill {
  background: linear-gradient(90deg, #2ee59d, #00f0ff);
}

.primary-neon-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.primary-neon-btn:active {
  transform: scale(0.98);
  filter: brightness(1.08);
}

/* GTA 6 뉴스 모달 */
.news-card {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(28, 10, 52, 0.96), rgba(14, 5, 28, 0.98));
  border: 1.5px solid rgba(255, 42, 133, 0.55);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.25);
  touch-action: pan-y;
}

.news-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.news-modal-header > div {
  min-width: 0;
  flex: 1;
}

.news-modal-title {
  font-size: clamp(14.5px, 4.1vw, 19px);
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  word-break: keep-all;
}

.news-close-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
}

.news-countdown-banner {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 42, 133, 0.24), rgba(0, 240, 255, 0.18));
  border: 1px solid rgba(0, 240, 255, 0.45);
  text-align: center;
  margin-bottom: 16px;
}

.countdown-caption {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  margin-bottom: 4px;
}

.countdown-digits {
  font-size: clamp(18px, 5.2vw, 26px);
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 42, 133, 0.7);
  font-variant-numeric: tabular-nums;
}

.countdown-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--neon-gold);
  font-weight: 600;
}

.countdown-kst-now {
  margin-top: 4px;
  font-size: 11px;
  color: #d8fbff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.news-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-article-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.news-article-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 42, 133, 0.24);
  color: #ff9ec9;
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.news-article-headline {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
}

.news-article-body {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.news-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.news-article-link {
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s;
}

.news-article-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 뉴스 모달 배너 광고 */
.news-banner-section {
  margin-bottom: 12px;
}

.news-ad-box {
  position: relative;
  border-radius: 12px;
  background: rgba(20, 10, 35, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 8px;
  text-align: center;
  overflow: hidden;
}

.news-ad-badge {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.25);
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.news-ad-badge.toss-badge {
  background: rgba(0, 100, 255, 0.3);
  color: #3182f6;
}

.news-web-banner-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-web-banner-slot iframe {
  max-width: 100%;
}

.news-toss-banner-slot {
  padding: 10px 6px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
}

/* 뉴스 페이징 바 */
.news-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-page-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.news-page-btn:hover:not(:disabled) {
  background: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

.news-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.news-page-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-pink);
  min-width: 60px;
  text-align: center;
}

.news-refresh-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 42, 133, 0.45);
  background: rgba(255, 42, 133, 0.14);
  color: #ff9ec9;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s;
}

.news-refresh-btn:hover {
  background: rgba(255, 42, 133, 0.28);
}

/* 입장 메인 화면 하단 배너 컨테이너 */
.main-banner-container {
  margin-top: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  max-width: 100%;
}

.main-ad-box {
  border-radius: 10px;
  background: rgba(12, 14, 28, 0.82);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-ad-box.toss-ad-box {
  padding: 6px 14px;
  gap: 8px;
  border-color: rgba(49, 130, 246, 0.45);
}

.toss-ad-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: #3182f6;
  color: #ffffff;
}

/* 인게임 HUD */
.hud-root {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.hud-left-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
  max-width: calc(100% - 268px);
}

.hud-right-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
  flex-shrink: 0;
}

.shop-open-btn {
  height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 184, 0, 0.75);
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.25), rgba(255, 42, 133, 0.3));
  color: #fff6d6;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 184, 0, 0.28);
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
  white-space: nowrap;
}

.shop-open-btn:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.48);
}

.shop-open-btn:active {
  transform: scale(0.94);
}

.hud-money-badge {
  color: var(--neon-gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.weapon-status-label {
  color: #ffd6ec;
  font-weight: 700;
}

.settings-gear-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 240, 255, 0.55);
  background: var(--panel-bg);
  color: #e6fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 240, 255, 0.22);
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
}

.settings-gear-btn:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.45);
}

.settings-gear-btn:active {
  transform: scale(0.93);
}

.hud-channel-label {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: #dffbff;
  font-size: 11px;
  font-weight: 800;
}

.hud-brand-pill,
.hud-status-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 12px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hud-title {
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--neon-pink);
}

.hud-channel-select {
  padding: 2px 6px;
  border-radius: 7px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(14, 5, 30, 0.9);
  color: #e8fcff;
  font-size: 11px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.hud-divider {
  color: rgba(255, 255, 255, 0.25);
}

.hud-online strong {
  color: var(--neon-cyan);
}

.env-badge {
  color: var(--neon-green);
  font-size: 11px;
  font-weight: 700;
}

.hud-status-pill.driving {
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255, 42, 133, 0.35);
}

.hud-status-pill.swimming {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.45);
}

#mode-label {
  font-weight: 700;
  color: #ffffff;
}

#speed-label {
  font-weight: 800;
  color: var(--neon-cyan);
  font-variant-numeric: tabular-nums;
}

#zone-label {
  color: var(--neon-gold);
  font-weight: 600;
}

/* 시간 및 날씨 컨트롤 바 */
.env-control-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.env-btn-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  gap: 2px;
}

.env-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.env-btn.active {
  background: rgba(0, 240, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.news-hud-btn {
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 42, 133, 0.65);
  background: linear-gradient(90deg, rgba(255, 42, 133, 0.42), rgba(157, 78, 221, 0.42));
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.35);
}

/* 설정 모달 */
#settings-modal {
  pointer-events: auto;
  z-index: 42;
}

.settings-card {
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(22, 9, 44, 0.96), rgba(11, 5, 24, 0.98));
  border: 1.5px solid rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 38px rgba(0, 240, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.settings-header > div {
  min-width: 0;
  flex: 1;
}

.settings-title {
  font-size: clamp(14.5px, 4.1vw, 19px);
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  word-break: keep-all;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.settings-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  border-radius: 10px;
}

.settings-btn-group {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.settings-btn-group .env-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
}

.settings-news-btn {
  width: 100%;
  padding: 10px 12px;
  font-size: 12.5px;
}

/* 미니맵 */
.minimap-wrapper {
  position: relative;
  width: 144px;
  height: 144px;
  border-radius: 14px;
  overflow: hidden;
  background: #0d6eb3;
  border: 1.5px solid rgba(0, 240, 255, 0.72);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 240, 255, 0.25);
  pointer-events: auto;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s, box-shadow 0.14s;
}

.minimap-wrapper:hover {
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.65);
}

.minimap-wrapper:active {
  transform: scale(0.97);
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.minimap-caption {
  position: absolute;
  bottom: 3px;
  left: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
  text-shadow: 0 1px 4px #000000;
  pointer-events: none;
}

/* 레오니다 주 전체 지도 모달 */
#worldmap-modal {
  pointer-events: auto;
  z-index: 40;
  padding: 6px;
}

.worldmap-card {
  width: 97vw;
  max-width: 1200px;
  height: 95vh;
  max-height: 95vh;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(22, 9, 44, 0.96), rgba(11, 5, 24, 0.98));
  border: 1.5px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worldmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.worldmap-header > div {
  min-width: 0;
  flex: 1;
}

.worldmap-title {
  font-size: clamp(14.5px, 4.1vw, 19px);
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  word-break: keep-all;
}

.worldmap-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(8, 3, 18, 0.72);
  border: 1px solid rgba(0, 240, 255, 0.25);
  flex-shrink: 0;
}

.wm-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #e8f8ff;
  white-space: nowrap;
}

.wm-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wm-dot.is-self {
  background: #ff2a85;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 6px #ff2a85;
}

.wm-dot.is-user {
  background: #00f5d4;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 6px #00f5d4;
}

.wm-dot.is-police {
  background: #3b82f6;
  border: 1px solid #ffffff;
}

.wm-dot.is-gang {
  background: #f97316;
  border: 1px solid #140726;
}

.wm-dot.is-citizen {
  background: #cbd5e1;
  border: 1px solid #475569;
}

.worldmap-canvas-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  background: #0d6eb3;
  display: flex;
  align-items: center;
  justify-content: center;
}

#worldmap-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.worldmap-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.worldmap-info {
  font-size: 12px;
  font-weight: 600;
  color: #d8fbff;
}

.worldmap-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.worldmap-sec-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.worldmap-pri-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #ff2a85, #00b8d9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

/* 차량 탑승 / 전광판 프롬프트 */
.interact-prompt {
  position: fixed;
  left: 50%;
  bottom: 148px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(20, 7, 38, 0.92);
  border: 1.5px solid var(--neon-pink);
  box-shadow: 0 0 18px rgba(255, 42, 133, 0.5);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  pointer-events: auto;
  cursor: pointer;
}

.prompt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--neon-pink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

/* 좌측 채팅 패널 (미니/중간/최대 크기 & 드래그 이동 지원) */
.chat-panel {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: 96px;
  width: 284px;
  border-radius: 14px;
  background: rgba(16, 6, 32, 0.58);
  border: 1px solid rgba(255, 42, 133, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 18;
}

.chat-panel.size-min {
  width: 284px;
}

.chat-panel.size-mid {
  width: 340px;
}

.chat-panel.size-max {
  left: max(12px, env(safe-area-inset-left)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  width: auto !important;
  height: auto !important;
  z-index: 45;
  background: rgba(16, 6, 32, 0.94);
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.35);
}

.chat-panel.move-active {
  border: 1.5px dashed var(--neon-cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.55);
  cursor: move;
  touch-action: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  padding: 5px 8px;
  background: rgba(255, 42, 133, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.chat-panel.size-max .chat-header {
  padding: 10px 14px;
  font-size: 13px;
}

.chat-mini-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #e8e1f8;
}

.chat-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.chat-ctrl-btn {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #e9e2f8;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.chat-panel.size-max .chat-ctrl-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.chat-size-btn.active {
  background: rgba(0, 240, 255, 0.28);
  border-color: var(--neon-cyan);
  color: #ffffff;
}

.chat-move-btn {
  border-color: rgba(255, 184, 0, 0.45);
  color: #ffe399;
  touch-action: none;
}

.chat-move-btn.active {
  background: rgba(0, 240, 255, 0.32);
  border-color: var(--neon-cyan);
  color: #ffffff;
}

.chat-messages {
  height: 100px;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  line-height: 1.35;
  touch-action: pan-y;
}

.chat-panel.size-min .chat-messages {
  height: 100px;
}

.chat-panel.size-mid .chat-messages {
  height: 220px;
}

.chat-panel.size-max .chat-messages {
  flex: 1;
  height: auto !important;
  font-size: 13px;
  padding: 12px 14px;
}

.chat-line {
  word-break: break-word;
}

.chat-line .chat-sender {
  font-weight: 700;
  margin-right: 5px;
}

.chat-line.system {
  color: var(--neon-gold);
  font-size: 11px;
}

.quick-chat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-panel.size-max .quick-chat-bar {
  flex-wrap: wrap;
  padding: 8px 12px;
  gap: 6px;
}

.chat-panel.size-max .chat-input-row {
  padding: 10px 12px;
}

.quick-chat-btn {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.1);
  color: #d8fbff;
  font-size: 10.5px;
  white-space: nowrap;
  cursor: pointer;
}

.quick-chat-btn:active {
  background: rgba(0, 240, 255, 0.3);
}

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 7px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#chat-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 4, 22, 0.85);
  color: #ffffff;
  font-size: 12px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

#chat-input:focus {
  border-color: var(--neon-cyan);
}

#chat-send-btn {
  padding: 0 12px;
  border-radius: 9px;
  border: none;
  background: var(--neon-pink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* 하단 컨트롤러 (모바일 터치 조이스틱 및 액션 버튼 - 화면 최하단 엄지 영역 완벽 고정) */
.hud-bottom {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 20;
}

.joystick-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.joystick-zone {
  position: relative;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12), rgba(20, 7, 38, 0.72));
  border: 2px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.18);
  touch-action: none;
}

.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #ff85b8, #ff2a85);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(255, 42, 133, 0.8);
  pointer-events: none;
}

.joystick-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.65);
}

.action-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.drive-pedals {
  display: flex;
  gap: 8px;
}

.pedal-btn {
  min-width: 84px;
  height: 50px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: none;
}

.brake-pedal {
  background: rgba(255, 59, 48, 0.38);
  border-color: rgba(255, 59, 48, 0.78);
}

.brake-pedal:active,
.brake-pedal.pressed {
  background: rgba(255, 59, 48, 0.72);
  transform: scale(0.95);
}

.accel-pedal {
  background: rgba(46, 229, 157, 0.35);
  border-color: rgba(46, 229, 157, 0.82);
}

.accel-pedal:active,
.accel-pedal.pressed {
  background: rgba(46, 229, 157, 0.72);
  transform: scale(0.95);
}

.action-buttons {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 66px;
  height: 66px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: var(--panel-bg);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}

.action-btn:active,
.action-btn.pressed {
  transform: scale(0.93);
}

.btn-key {
  font-size: 10px;
  font-weight: 800;
  color: var(--neon-cyan);
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 240, 255, 0.14);
}

.btn-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-action-btn {
  min-width: 80px;
  height: 74px;
  border-color: rgba(255, 42, 133, 0.6);
  background: linear-gradient(160deg, rgba(255, 42, 133, 0.34), rgba(20, 7, 38, 0.86));
}

.primary-action-btn.highlight {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.65);
  animation: pulseBtn 1.1s infinite ease-in-out;
}

@keyframes pulseBtn {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 터치 기기(모바일/태블릿)에서는 키보드 단축키 캡 숨김 및 터치 최적화 */
@media (pointer: coarse), (max-width: 768px) {
  .btn-key,
  .prompt-key {
    display: none;
  }

  .hud-left-group {
    max-width: calc(100% - 196px);
  }

  .hud-right-group {
    gap: 5px;
  }

  .shop-open-btn {
    height: 34px;
    padding: 0 9px;
    font-size: 11px;
    border-radius: 10px;
  }

  .settings-gear-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .minimap-wrapper {
    width: 94px;
    height: 94px;
  }

  .hud-brand-pill,
  .hud-status-pill {
    font-size: 10px;
    padding: 4px 7px;
    gap: 4px;
  }

  .env-btn {
    padding: 5px 7px;
    font-size: 11px;
  }

  .news-hud-btn {
    padding: 8px 10px;
    font-size: 11.5px;
  }

  .chat-panel {
    top: 108px;
    width: 220px;
  }

  .chat-panel.size-min {
    width: 220px;
  }

  .chat-panel.size-mid {
    width: 280px;
  }

  .chat-controls {
    gap: 2px;
  }

  .chat-ctrl-btn {
    padding: 2px 5px;
    font-size: 9.5px;
  }

  .chat-messages {
    height: 64px;
    padding: 6px 8px;
    font-size: 10.5px;
    gap: 3px;
  }

  .chat-panel.size-min .chat-messages {
    height: 64px;
  }

  .chat-panel.size-mid .chat-messages {
    height: 156px;
  }

  .chat-panel:not(.size-max) .quick-chat-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 6px;
    gap: 4px;
  }

  .chat-panel.size-max .quick-chat-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 6px;
  }

  .chat-panel.size-max .chat-input-row {
    padding: 10px 12px;
  }

  .chat-panel.size-max #chat-input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .quick-chat-bar::-webkit-scrollbar {
    display: none;
  }

  .quick-chat-btn {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 7px;
  }

  .chat-input-row {
    padding: 5px 6px;
  }

  #chat-input {
    padding: 5px 8px;
    font-size: 11px;
  }

  .joystick-zone {
    width: 102px;
    height: 102px;
  }

  .joystick-knob {
    width: 40px;
    height: 40px;
  }

  .action-buttons {
    gap: 5px;
  }

  .action-btn {
    min-width: 48px;
    height: 52px;
    padding: 5px;
  }

  .shoot-action-btn {
    min-width: 54px;
    height: 56px;
  }

  .primary-action-btn {
    min-width: 62px;
    height: 58px;
  }

  .pedal-btn {
    min-width: 76px;
    height: 46px;
    font-size: 11px;
  }

  .btn-label {
    font-size: 11px;
  }

  .hud-bottom {
    left: 8px;
    right: 8px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .hud-reward-bar {
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 72px));
    transform: translateX(-50%) scale(0.92);
  }

  .interact-prompt {
    bottom: 120px;
    font-size: 12px;
  }
}

/* 3D 시점 연동 고시인성 전술 조준점 */
.crosshair {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.95));
  transition: transform 0.08s ease-out;
}

.crosshair.shooting {
  transform: translate(-50%, -50%) scale(1.24);
}

.ch-ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.88);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.72), inset 0 0 4px rgba(0, 0, 0, 0.65);
}

.ch-line {
  position: absolute;
  background: #00f0ff;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.95), 0 0 2px #000000;
  border-radius: 2px;
}

.ch-top,
.ch-bottom {
  width: 2.5px;
  height: 9px;
  left: 50%;
  transform: translateX(-50%);
}

.ch-top {
  top: 0;
}

.ch-bottom {
  bottom: 0;
}

.ch-left,
.ch-right {
  width: 9px;
  height: 2.5px;
  top: 50%;
  transform: translateY(-50%);
}

.ch-left {
  left: 0;
}

.ch-right {
  right: 0;
}

.ch-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff2a85;
  border: 1px solid #ffffff;
  box-shadow: 0 0 8px #ff2a85;
}

/* 우측 하단 사격 액션 버튼 (우측 최외곽 메인 공격 키) */
.shoot-action-btn {
  min-width: 78px;
  height: 72px;
  background: linear-gradient(135deg, rgba(255, 42, 85, 0.95), rgba(255, 153, 0, 0.9));
  border: 2px solid rgba(255, 214, 102, 0.9);
  box-shadow: 0 0 20px rgba(255, 42, 85, 0.65);
  color: #ffffff;
}

.shoot-action-btn.pressed,
.shoot-action-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 28px rgba(255, 184, 0, 0.95);
}

.vehicle-action-btn {
  border-color: rgba(0, 240, 255, 0.45);
}

.vehicle-action-btn.highlight {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
  animation: pulseBtn 1.1s infinite ease-in-out;
}

/* 하단 보상형 광고 바 */
.hud-reward-bar {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 6, 36, 0.88);
  border: 1.5px solid rgba(255, 184, 0, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.48), 0 0 14px rgba(255, 184, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  white-space: nowrap;
}

.reward-bar-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reward-ad-tag {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 184, 0, 0.22);
  border: 1px solid rgba(255, 184, 0, 0.6);
  color: var(--neon-gold);
  font-size: 9.5px;
  font-weight: 900;
}

.reward-wallet-text {
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.reward-ad-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #ff9900, #ff2a85);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 42, 133, 0.45);
}

.reward-ad-btn:active {
  transform: scale(0.95);
}

/* 총기 상점 모달 */
#shop-modal {
  pointer-events: auto;
  z-index: 44;
}

.shop-card {
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(24, 9, 46, 0.97), rgba(11, 4, 24, 0.99));
  border: 1.5px solid rgba(255, 184, 0, 0.6);
  box-shadow: 0 0 40px rgba(255, 42, 133, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
  touch-action: pan-y;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.shop-header > div:first-child {
  min-width: 0;
  flex: 1;
}

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

.shop-title {
  font-size: clamp(14.5px, 4.1vw, 19px);
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  word-break: keep-all;
}

.shop-money-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.16);
  border: 1px solid rgba(255, 184, 0, 0.65);
  color: var(--neon-gold);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.shop-category-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.shop-tab-btn {
  padding: 8px 6px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.shop-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.34), rgba(0, 240, 255, 0.24));
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.32);
}

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

.weapon-item-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.weapon-item-card.owned {
  border-color: rgba(0, 240, 255, 0.45);
}

.weapon-item-card.equipped {
  border-color: var(--neon-pink);
  background: rgba(255, 42, 133, 0.12);
  box-shadow: 0 0 14px rgba(255, 42, 133, 0.28);
}

.weapon-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.weapon-cat-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.14);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  margin-bottom: 4px;
}

.weapon-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  word-break: keep-all;
}

.weapon-price-tag {
  font-size: 13px;
  font-weight: 900;
  color: var(--neon-gold);
  white-space: nowrap;
}

.weapon-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: keep-all;
}

.weapon-specs {
  font-size: 10.5px;
  color: #b8f5ff;
  font-weight: 700;
}

.weapon-action-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(90deg, #ff2a85, #d91b7a);
}

.weapon-action-btn.equip-btn {
  background: rgba(0, 240, 255, 0.22);
  border: 1px solid rgba(0, 240, 255, 0.6);
  color: #dffbff;
}

.weapon-action-btn.equipped-btn {
  background: rgba(46, 229, 157, 0.22);
  border: 1px solid rgba(46, 229, 157, 0.7);
  color: #d8ffef;
}

.weapon-action-btn.disabled-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.shop-reward-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 184, 0, 0.14), rgba(255, 42, 133, 0.14));
  border: 1px solid rgba(255, 184, 0, 0.48);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-reward-text {
  font-size: 12px;
  color: #fff2cc;
  line-height: 1.4;
  word-break: keep-all;
}

.shop-reward-ad-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(90deg, #ffb800, #ff2a85);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

/* 웹 전용 보상형 스폰서 광고 모달 */
#web-reward-ad-modal {
  pointer-events: auto;
  z-index: 50;
}

.web-reward-card {
  width: 100%;
  max-width: 400px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(22, 9, 44, 0.98), rgba(11, 5, 24, 0.99));
  border: 1.5px solid rgba(255, 184, 0, 0.65);
  box-shadow: 0 0 36px rgba(255, 184, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.web-reward-slot {
  min-height: 130px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.web-reward-timer-text {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--neon-cyan);
}

#claim-web-reward-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (pointer: coarse), (max-width: 768px) {
  .hud-reward-bar {
    left: auto;
    right: 12px;
    transform: none;
    bottom: max(82px, calc(env(safe-area-inset-bottom) + 74px));
    max-width: 256px;
    padding: 4px 8px;
    gap: 6px;
  }

  .hud-reward-bar.driving-shift {
    bottom: max(134px, calc(env(safe-area-inset-bottom) + 126px));
  }

  .reward-wallet-text {
    font-size: 10.5px;
  }

  .reward-ad-btn {
    padding: 4px 8px;
    font-size: 10.5px;
  }
}

@media (max-width: 520px) {
  .shop-card {
    padding: 15px 14px;
  }

  .shop-weapons-grid {
    grid-template-columns: 1fr;
  }

  .brand-badge {
    font-size: 8.5px;
    letter-spacing: 0.6px;
    padding: 3px 8px;
  }

  .countdown-digits {
    letter-spacing: 0.8px;
  }
}
