@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

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

body {
  overflow: hidden;
  background: #1e1a14;
  background-image: radial-gradient(circle at 50% 50%, rgba(44, 36, 22, 0.4) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(0,0,0,0.03) 4px, rgba(0,0,0,0.03) 8px),
    repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(0,0,0,0.03) 4px, rgba(0,0,0,0.03) 8px);
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

/* 모바일: 첫 터치 전 표시 → 터치하면 사라짐 (검은 화면/오디오 잠금 해제) */
.tap-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1510;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tap-overlay-inner {
  text-align: center;
  padding: 24px;
}
.tap-overlay-title {
  color: #f5f0e6;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.tap-overlay-sub {
  color: rgba(245, 240, 230, 0.85);
  font-size: 16px;
  font-weight: 500;
}
.tap-overlay.hidden {
  display: none !important;
}
@media (max-width: 768px) {
  .tap-overlay-title { font-size: 24px; }
  .tap-overlay-sub { font-size: 18px; }
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (max-width: 768px) {
  #game-container {
    align-items: stretch;
    justify-content: stretch;
  }
}

/* 게임 화면: 위아래 꽉 채움, 좌우는 비율 유지(여백 가능) */
#game-canvas {
  display: block;
  background: #87CEEB;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 8px;
  border: 4px solid #3d3428;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,0,0.15),
    0 6px 0 #2c2416,
    0 8px 20px rgba(0,0,0,0.4);
}
@media (min-width: 769px) {
  #game-canvas {
    height: 100vh;
    height: 100dvh;
    width: auto;
    max-height: 100vh;
    max-height: 100dvh;
  }
}
@media (max-width: 768px) {
  #game-canvas {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: fill;
    border-radius: 0;
    border-width: 0;
    box-shadow: none;
  }
}

/* 신발 레벨업 축하: 0.9배(432px), 이미지 중심=캐릭터 머리 정중앙 위 */
.shoe-levelup-celebration {
  position: absolute;
  left: 0;
  top: 0;
  width: 432px;
  height: 432px;
  margin-left: -216px;
  margin-top: -216px;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
}
.shoe-levelup-celebration.hidden {
  display: none !important;
}
.shoe-levelup-celebration.animate {
  display: block;
  animation: shoe-levelup-celebration 2.6s ease-out forwards;
}
.shoe-levelup-celebration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  vertical-align: middle;
}
.shoe-levelup-item-popup {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  height: 150px;
  margin-left: -60px;
  margin-top: -75px;
  pointer-events: none;
  z-index: 51;
  opacity: 0;
}
.shoe-levelup-item-popup.hidden {
  display: none !important;
}
.shoe-levelup-item-popup.animate {
  display: block;
  animation: shoe-levelup-item-popup 1.9s ease-out forwards;
}
.shoe-levelup-item-card {
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(16, 16, 18, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.85), 0 0 18px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.shoe-levelup-item-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.25);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.shoe-levelup-item-text {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0,0,0,0.85);
}
@keyframes shoe-levelup-celebration {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.85);
    filter: brightness(0.3);
  }
  16% {
    opacity: 1;
    transform: translateY(-8px) scale(1);
    filter: brightness(2.8);
  }
  32% {
    opacity: 1;
    transform: translateY(-36px) scale(1.02);
    filter: brightness(2);
  }
  65% {
    opacity: 1;
    transform: translateY(-56px) scale(1);
    filter: brightness(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(0.95);
    filter: brightness(0.9);
  }
}
@keyframes shoe-levelup-item-popup {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.85);
    filter: brightness(0.75);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1.45);
  }
  65% {
    opacity: 1;
    transform: translateY(-24px) scale(1);
    filter: brightness(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-38px) scale(0.97);
    filter: brightness(0.95);
  }
}

/* HUD 바: 프로필(왼) + 상태(중앙) + 로그인 버튼(오른) - 픽셀 도트감, 글자 한 줄 유지 */
#hud-bar {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0 12px;
  padding: 0;
  pointer-events: none;
  z-index: 200;
  white-space: nowrap;
}
#hud-bar > * {
  pointer-events: auto;
}
#hud-bar .hud-profile {
  pointer-events: auto;
}
#hud-bar #hud,
#hud-bar .login-hud-btn {
  white-space: nowrap;
}
.hud-profile {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 3px solid rgba(212, 165, 116, 0.6);
  background: rgba(30, 26, 22, 0.95);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 2px 0 rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  aspect-ratio: 1;
  pointer-events: auto;
}
.hud-profile:focus {
  outline: 2px solid rgba(212, 165, 116, 0.6);
  outline-offset: 2px;
}
.profile-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 220px;
  z-index: 300;
  pointer-events: auto;
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%);
  border: 2px solid rgba(212, 165, 116, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.profile-panel.hidden {
  display: none !important;
}
.profile-panel-body {
  padding: 14px 16px;
}
.profile-panel-email {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #f5f0e6;
  word-break: break-all;
}
.profile-panel-meta {
  margin: 0 0 14px 0;
  font-size: 12px;
  color: rgba(245, 240, 230, 0.8);
}
.profile-panel-label {
  color: rgba(212, 165, 116, 0.9);
  margin-right: 4px;
}
.profile-logout-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(180deg, #5d4e3a 0%, #3d3428 100%);
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 8px;
  color: #f5f0e6;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.profile-logout-btn:hover {
  background: linear-gradient(180deg, #6d5e4a 0%, #4d4438 100%);
}
.hud-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  pointer-events: none;
}
.hud-profile-img[src=""],
.hud-profile-img:not([src]) {
  opacity: 0.6;
}
.login-hud-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 10px;
  border: 3px solid rgba(212, 165, 116, 0.55);
  background: linear-gradient(180deg, #5d4e3a 0%, #3d3428 100%);
  color: #f5f0e6;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 3px 0 #2c2416, 0 4px 8px rgba(0,0,0,0.3);
  image-rendering: pixelated;
}
.login-hud-btn:hover {
  background: linear-gradient(180deg, #6d5e4a 0%, #4d4438 100%);
  border-color: rgba(212, 165, 116, 0.7);
}
.login-hud-btn .login-hud-coin {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.login-hud-btn .login-hud-label {
  vertical-align: middle;
}
.login-hud-btn.logged-in {
  padding: 8px 12px;
  font-size: 11px;
  background: linear-gradient(180deg, #3d4a2e 0%, #2d3520 100%);
  border-color: rgba(139, 195, 74, 0.4);
}
.login-hud-btn.logged-in .login-hud-coin,
.login-hud-btn.logged-in .login-hud-label { display: none; }

/* HUD - 아이템 상태 (픽셀 도트감) */
#hud {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(50, 42, 32, 0.95) 0%, rgba(35, 28, 20, 0.98) 100%);
  border-radius: 10px;
  border: 3px solid rgba(212, 165, 116, 0.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25), 0 3px 0 rgba(0,0,0,0.15);
  color: #f5f0e6;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
}

#hud .hud-label {
  color: rgba(245, 240, 230, 0.75);
  font-size: 11px;
  font-weight: 400;
  margin-right: 2px;
}

#hud .hud-value {
  font-weight: 600;
  color: #f5f0e6;
}

#hud .hud-block {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  border-right: 1px solid rgba(212, 165, 116, 0.25);
}

#hud .hud-block.shoe-clickable {
  cursor: pointer;
  padding: 2px 10px 2px 0;
  border-radius: 8px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
#hud .hud-block.shoe-clickable:hover,
#hud .hud-block.shoe-clickable:focus-visible {
  background: rgba(201, 162, 39, 0.14);
  outline: none;
}
#hud .hud-chevron {
  color: rgba(201, 162, 39, 0.9);
  font-size: 15px;
  margin-left: 2px;
}

#hud .hud-block:last-of-type {
  border-right: none;
  padding-right: 0;
}

#hud .hud-icon {
  font-size: 18px;
  line-height: 1;
}

#hud .hud-item-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}
#hud .hud-shoe-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #hud-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    flex-wrap: wrap;
    gap: 6px 8px;
  }
  .hud-profile {
    width: 32px;
    height: 32px;
  }
  .login-hud-btn {
    order: 3;
    width: 100%;
    padding: 8px 12px;
    font-size: 11px;
  }
  #hud {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 8px 10px;
    font-size: 11px;
  }
  #hud .hud-block {
    padding-right: 8px;
    border-right-width: 1px;
  }
  #hud .hud-icon {
    font-size: 14px;
  }
  #hud .hud-item-img {
    width: 16px;
    height: 16px;
  }
  #hud .hud-shoe-img {
    width: 16px;
    height: 16px;
  }
  #hud .hud-label {
    font-size: 10px;
  }
  .shoe-gauge {
    width: 40px;
    height: 6px;
  }
  #hint {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    transform: none;
    font-size: 11px;
    padding: 6px 10px;
    bottom: 18%;
    text-align: center;
  }
}

.shoe-gauge-wrap {
  align-items: center;
  gap: 6px;
}
.shoe-gauge {
  width: 60px;
  height: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
  overflow: hidden;
}
.shoe-gauge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7cb342, #aed581);
  border-radius: 4px;
  transition: width 0.15s ease-out;
}

#hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(245, 240, 230, 0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  pointer-events: none;
  background: rgba(0,0,0,0.35);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Overlays & Modals - 반응형 공통 (화면 찌부 방지, 스크롤 없이 한눈에) */
.overlay, .modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 18, 14, 0.82);
  z-index: 100;
  padding: 12px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100vw;
}

.overlay.hidden, .modal.hidden {
  display: none;
}

@media (max-width: 480px) {
  .overlay, .modal {
    padding: 8px;
  }
}

/* Jail - 부드러운 감성 */
.jail-box {
  max-width: min(420px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%);
  border: 2px solid rgba(212, 165, 116, 0.6);
  border-radius: 20px;
  padding: 28px 32px;
  text-align: center;
  color: #f5f0e6;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.jail-box h2 {
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 600;
  color: #e8dcc8;
}

.jail-box #jail-timer {
  font-size: 3.2rem;
  font-weight: 700;
  color: #d4a574;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.jail-box .small {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(245, 240, 230, 0.7);
}

/* Modal 공통 - 반응형(화면 찌부 방지), 스크롤 없이 한눈에 */
.modal-box {
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%);
  border: 2px solid rgba(212, 165, 116, 0.5);
  border-radius: 18px;
  padding: 28px 32px;
  color: #f5f0e6;
  max-width: min(900px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255, 0.06);
}

.modal-box h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e8dcc8;
  text-align: center;
}

.modal-box button {
  margin: 4px 6px 4px 0;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #7cb342 0%, #558b2f 100%);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.modal-box button:hover {
  background: linear-gradient(180deg, #8bc34a 0%, #689f38 100%);
  transform: translateY(-1px);
}

.modal-box button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Home: 상태/인벤토리 모달 - 검정+금색 (로그인 모달과 동일 UI) */
.home-status-box {
  max-width: min(800px, 94vw);
  width: min(800px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  padding: 20px 24px 24px;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(201, 162, 39, 0.12), 0 0 24px rgba(201, 162, 39, 0.1) !important;
  box-sizing: border-box;
}
.home-status-title {
  font-size: 1.35rem;
  margin-bottom: 20px;
  color: #c9a227 !important;
  text-shadow: 0 0 16px rgba(201, 162, 39, 0.2);
  letter-spacing: 0.02em;
}
.home-status-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 24px;
  min-height: 180px;
}
.home-status-left,
.home-status-right {
  flex: 0 0 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-status-left {
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 220px;
}
@media (max-width: 480px) {
  .home-status-layout {
    flex-direction: column;
    gap: 16px;
    min-height: 0;
  }
  .home-status-left,
  .home-status-right {
    flex: 0 0 auto;
  }
}
.home-status-panel {
  padding: 18px 16px;
  background: #1a1a1a;
  border-radius: 14px;
  border: 2px solid rgba(201, 162, 39, 0.4);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}
.home-status-panel .home-status-label {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
  color: #c9a227;
}
.home-status-panel .home-status-value {
  color: rgba(255, 255, 255, 0.9);
}
.home-status-box .home-close-btn {
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  color: rgba(201, 162, 39, 0.95) !important;
  padding: 8px 20px;
  border-radius: 8px;
}
.home-status-box .home-close-btn:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}
.home-status-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
}
.home-character-frame {
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 12, 10, 0.95) 0%, rgba(8, 6, 5, 0.98) 100%);
  border-radius: 16px;
  border: 3px solid rgba(212, 165, 116, 0.4);
  box-shadow: inset 0 0 24px rgba(0,0,0,0.5), 0 4px 0 rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
#home-character-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: transparent;
}
.home-status-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-status-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8956a;
}
.home-status-value {
  font-size: 15px;
  font-weight: 600;
  color: #f5f0e6;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
#home-login-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
#home-login-status.home-login-ok {
  color: #4ade80;
  font-weight: 600;
  white-space: normal;
}
#home-login-status .home-login-check {
  display: inline-block;
  margin-right: 6px;
  color: #4ade80;
  font-weight: bold;
}
#home-equipped-shoe {
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.35;
  max-width: 100%;
}
#home-equipped-shoe-speed {
  white-space: nowrap;
  word-break: keep-all;
  font-size: 13px;
  color: #e8dcc8;
  opacity: 0.92;
}
.home-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e8dcc8;
}
.home-status-row.home-status-row-shoe {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;
  min-height: 52px;
}
.home-status-row.home-status-row-shoe .home-status-label { flex-shrink: 0; }
.home-status-row.home-status-row-shoe .home-status-shoe-img { flex-shrink: 0; }
.home-status-row.home-status-row-shoe #home-equipped-shoe {
  flex: 1 1 100%;
  min-width: 0;
  display: block;
  width: 100%;
}
.home-status-row.home-status-row-shoe #home-equipped-shoe-speed {
  flex-shrink: 0;
  display: block;
  margin-top: 2px;
}
.home-status-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  flex-shrink: 0;
}
.home-status-right .home-status-icon-wrap {
  width: 80px;
}
.home-item-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.home-status-shoe-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.home-status-icon-wrap .home-item-icon-coin {
  width: 80px;
  height: 80px;
}
.home-item-icon-coin {
  width: 80px;
  height: 80px;
}
.home-close-btn {
  display: block;
  width: fit-content;
  margin: 0 0 0 auto;
  padding: 10px 24px;
  font-size: 14px;
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  border-radius: 8px;
  color: rgba(201, 162, 39, 0.95) !important;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.home-close-btn:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}

.home-shoe-carousel-wrap {
  margin: 4px 0 14px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(212, 165, 116, 0.32);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(45, 37, 27, 0.85) 0%, rgba(27, 21, 16, 0.9) 100%);
}
.home-shoe-carousel-header {
  color: #d4a574;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.home-shoe-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
/* 신발 캐러셀 네비 버튼: 모달 테마에 맞게 브라운/골드 (.modal-box button 연두색 완전 덮어씀) */
.modal-box .home-shoe-carousel-wrap .home-shoe-nav-btn {
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.6) !important;
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%) !important;
  color: #c9a227 !important;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transform: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.modal-box .home-shoe-carousel-wrap .home-shoe-nav-btn:hover {
  background: linear-gradient(180deg, #4a3e30 0%, #33281a 100%) !important;
  border-color: rgba(201, 162, 39, 0.9) !important;
  transform: none !important;
}
.modal-box .home-shoe-carousel-wrap .home-shoe-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}
.home-shoe-nav-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.home-shoe-nav-btn.prev .home-shoe-nav-icon {
  transform: rotate(-135deg);
  margin-left: 3px;
}
.home-shoe-nav-btn.next .home-shoe-nav-icon {
  transform: rotate(45deg);
  margin-right: 3px;
}
.home-shoe-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100px;
  flex: 1 1 auto;
}
.home-shoe-card {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(18, 18, 18, 0.9) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.42;
  filter: grayscale(0.35);
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}
.home-shoe-card:hover {
  background: rgba(18, 18, 18, 0.9) !important;
  transform: none;
}
.home-shoe-card.empty {
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}
.home-shoe-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.6);
  transform-origin: center center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.home-shoe-card.center {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  opacity: 1;
  border: 2px solid rgba(201, 162, 39, 0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.75), 0 0 18px rgba(201, 162, 39, 0.28);
  filter: none;
  transform: translateY(-1px);
}
.home-shoe-card.center img {
  width: 100%;
  height: 100%;
  transform: scale(1.75);
  transform-origin: center center;
}
.home-shoe-card.near {
  opacity: 0.72;
  filter: grayscale(0.15);
}
.home-shoe-card.locked {
  opacity: 0.28;
  filter: grayscale(0.9);
}
.home-shoe-card.locked.coin-lock {
  opacity: 0.72;
  filter: grayscale(0.12);
  border-color: rgba(201, 162, 39, 0.42);
}
.home-shoe-card.preview:not(.center) {
  border-color: rgba(201, 162, 39, 0.45);
}
.home-shoe-card.shoe-tier-7 {
  border-color: rgba(90, 220, 255, 0.55);
  box-shadow: 0 0 10px rgba(80, 210, 255, 0.25);
}
.home-shoe-card.shoe-tier-8 {
  border-color: rgba(149, 255, 94, 0.55);
  box-shadow: 0 0 10px rgba(134, 255, 76, 0.24);
}
.home-shoe-card.shoe-tier-9 {
  border-color: rgba(168, 34, 45, 0.62);
  box-shadow: 0 0 12px rgba(133, 20, 28, 0.28);
}
.home-shoe-card.shoe-tier-10 {
  border-color: rgba(170, 95, 255, 0.62);
  box-shadow: 0 0 12px rgba(143, 63, 255, 0.3);
}
.home-shoe-card.center.shoe-tier-7 {
  border-color: rgba(105, 232, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.75), 0 0 20px rgba(95, 224, 255, 0.55);
}
.home-shoe-card.center.shoe-tier-8 {
  border-color: rgba(165, 255, 112, 0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.75), 0 0 20px rgba(149, 255, 95, 0.5);
}
.home-shoe-card.center.shoe-tier-9 {
  border-color: rgba(196, 42, 56, 0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.75), 0 0 20px rgba(162, 28, 40, 0.52);
}
.home-shoe-card.center.shoe-tier-10 {
  border-color: rgba(188, 118, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.75), 0 0 22px rgba(157, 84, 255, 0.56);
}
.home-shoe-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.home-shoe-selected-name {
  font-size: 13px;
  color: #e8dcc8;
  font-weight: 600;
}
.home-shoe-selected-speed {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #7cff7c;
  text-shadow: 0 0 6px rgba(124, 255, 124, 0.35);
}
/* 이 신발 장착 버튼: 연두색 적용 안 되도록 모달 테마 브라운/골드 */
.modal-box .home-shoe-carousel-wrap .home-shoe-equip-btn {
  margin: 0 !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(212, 165, 116, 0.65) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%) !important;
  color: #f5f0e6 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35) !important;
  transform: none !important;
}
.modal-box .home-shoe-carousel-wrap .home-shoe-equip-btn:hover {
  background: linear-gradient(180deg, #4a3e30 0%, #33281a 100%) !important;
}
.modal-box .home-shoe-carousel-wrap .home-shoe-equip-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}
.modal-box .home-shoe-carousel-wrap .home-shoe-equip-btn .home-coin-inline {
  width: 14px;
  height: 14px;
  object-fit: contain;
  position: relative;
  top: 2px;
  margin: 0 1px 0 3px;
}

.home-status-box {
  background: linear-gradient(180deg, #3d3428 0%, #2c2416 100%) !important;
  border: 2px solid rgba(212, 165, 116, 0.55) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
.home-status-panel {
  background: rgba(30, 24, 17, 0.9);
  border-color: rgba(212, 165, 116, 0.35);
}

.shoe-detail-box {
  max-width: min(500px, 94vw);
  width: min(500px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
}
.shoe-detail-content {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.shoe-detail-image {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  border: 2px solid rgba(201, 162, 39, 0.5);
  background: rgba(18, 18, 18, 0.9);
  object-fit: contain;
  flex-shrink: 0;
}
.shoe-detail-stats {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shoe-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.shoe-detail-label {
  color: #b8956a;
  font-size: 12px;
}
.shoe-detail-value {
  color: #f5f0e6;
  font-weight: 600;
  text-align: right;
}

/* 로그인 모달 - 검정 + 금색, 반응형 */
.login-modal-box {
  max-width: min(360px, 94vw);
  width: min(360px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  overflow-x: hidden;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(201, 162, 39, 0.12), 0 0 24px rgba(201, 162, 39, 0.1) !important;
  box-sizing: border-box;
}
.login-modal-box h2 {
  color: #c9a227 !important;
}
.login-modal-desc {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: rgba(201, 162, 39, 0.85);
}
.login-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
/* Google 공식 스타일: 흰 배경 + 입체감 */
/* Google 로그인: 주황 강조로 눌러야 할 버튼 유도 */
.login-google-official,
.login-modal-box .login-google-official {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f5a623 0%, #e8910e 100%) !important;
  color: #1a1a1a !important;
  border: 2px solid rgba(245, 166, 35, 0.7);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.35), 0 4px 12px rgba(0,0,0,0.3);
}
.login-google-official:hover,
.login-modal-box .login-google-official:hover {
  background: linear-gradient(180deg, #ffb84d 0%, #f5a623 100%) !important;
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.45), 0 4px 14px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}
.login-google-official:active,
.login-modal-box .login-google-official:active {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.08);
  transform: translateY(1px);
}
.login-google-g {
  flex-shrink: 0;
}
/* 카카오 로그인: 노란 배경 + 카카오 로고, 글자 중앙 (구글과 동일 레이아웃) */
.login-kakao-official,
.login-modal-box .login-kakao-official {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: #FEE500 !important;
  color: #191919 !important;
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.login-kakao-official:hover,
.login-modal-box .login-kakao-official:hover {
  background: #fef048 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.login-kakao-official:active,
.login-modal-box .login-kakao-official:active {
  transform: translateY(1px);
}
.login-kakao-logo {
  flex-shrink: 0;
}
/* 다른 방법으로 로그인하기: 텍스트+밑줄만 (버튼 스타일 없음) */
.login-other-wrap {
  margin: 0 0 12px 0;
  text-align: center;
}
.login-email-toggle {
  display: inline;
  padding: 0;
  margin: 0;
  background: none !important;
  border: none !important;
  border-radius: 0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: rgba(201, 162, 39, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  box-shadow: none !important;
}
.login-email-toggle:hover {
  color: #c9a227;
}
.login-email-toggle:focus {
  outline: 1px solid rgba(201, 162, 39, 0.5);
  outline-offset: 2px;
}
/* 이메일 폼 래퍼: 접혀 있다가 펼쳐짐 */
.login-email-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}
.login-email-wrap.expanded {
  max-height: 320px;
}
.login-divider {
  text-align: center;
  margin: 12px 0 10px 0;
  font-size: 12px;
  color: rgba(201, 162, 39, 0.6);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.login-form.hidden {
  display: none !important;
}
.login-input {
  padding: 10px 14px;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: 8px;
  background: #1a1a1a;
  color: #f5f0e6;
  font-size: 14px;
  font-family: inherit;
}
.login-input::placeholder {
  color: rgba(201, 162, 39, 0.5);
}
/* 로그인/가입하기: 연두색 .modal-box button 덮어쓰기 → Google 버튼과 동일 주황/금색 톤 */
.login-modal-box .login-submit-btn,
.login-submit-btn {
  padding: 10px 16px;
  background: linear-gradient(180deg, #f5a623 0%, #e8910e 100%) !important;
  border: 2px solid rgba(245, 166, 35, 0.7) !important;
  border-radius: 8px;
  color: #1a1a1a !important;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.35), 0 4px 12px rgba(0,0,0,0.3);
}
.login-modal-box .login-submit-btn:hover,
.login-submit-btn:hover {
  background: linear-gradient(180deg, #ffb84d 0%, #f5a623 100%) !important;
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.45), 0 4px 14px rgba(0,0,0,0.35);
}
.login-submit-btn:active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
/* 회원가입/로그인으로 돌아가기: 연두색 덮어쓰기 → 검정+금색 (닫기 버튼과 동일) */
.login-modal-box .login-signup-btn,
.login-signup-btn {
  padding: 8px 14px;
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.4) !important;
  border-radius: 8px;
  color: rgba(201, 162, 39, 0.9) !important;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.login-signup-btn:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.5) !important;
}
.login-message {
  margin: 0 0 12px 0;
  font-size: 12px;
  min-height: 1.2em;
}
.login-message.error { color: #ef5350; }
.login-message.success { color: #81c784; }
.login-close-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
/* 닫기: 비강조 검정+금색 (연두색 .modal-box button 덮어씀) */
.login-modal-box .login-close-btn,
.login-close-btn {
  display: block;
  margin: 0;
  padding: 8px 20px;
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  border-radius: 8px;
  color: rgba(201, 162, 39, 0.95) !important;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}
.login-close-btn:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}
.login-close-btn:active {
  box-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

/* gacha-close, shop-close는 각 모달(.gacha-box, .shop-box) 내 스타일로 처리 */

/* MEETCAP 입장 확인 모달 - 검정 + 금색 */
.meetcap-confirm-box {
  max-width: min(360px, 94vw);
  width: min(360px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  background: #0d0d0d;
  border: 2px solid #c9a227;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(201, 162, 39, 0.15),
    0 0 24px rgba(201, 162, 39, 0.12);
  padding: 28px 24px;
}
.meetcap-confirm-inner {
  padding: 0;
}
.meetcap-confirm-title {
  font-size: 22px;
  font-weight: 700;
  color: #c9a227;
  letter-spacing: 0.08em;
  margin: 0 0 10px 0;
  text-shadow: 0 0 20px rgba(201, 162, 39, 0.3);
}
.meetcap-confirm-text {
  margin: 0 0 24px 0;
  font-size: 16px;
  font-weight: 500;
  color: rgba(201, 162, 39, 0.9);
}
.meetcap-confirm-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
}
/* MEETCAP 모달 버튼: .modal-box button 연두색이 적용되지 않도록 명시 */
.meetcap-confirm-box .meetcap-btn,
.meetcap-unsaved-box .meetcap-btn {
  background: transparent;
  color: inherit;
}
.meetcap-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  border: 2px solid transparent;
  transition: box-shadow 0.2s, transform 0.1s;
}
.meetcap-btn:hover {
  transform: translateY(-1px);
}
/* 취소/계속 진행: 검정 + 금색 테두리 (연두 X) */
.meetcap-btn-cancel {
  background: #1a1a1a !important;
  color: rgba(201, 162, 39, 0.9) !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.meetcap-btn-cancel:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}
/* 확인: 메탈릭 골드 (검정·금 테마에 맞춤, 로그인 버튼과 색 구분) */
.meetcap-btn-ok {
  background: linear-gradient(180deg, #D4AF37 0%, #b8980f 100%) !important;
  color: #0d0d0d !important;
  border: 2px solid rgba(212, 175, 55, 0.8) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35), 0 4px 12px rgba(0,0,0,0.4);
}
.meetcap-btn-ok:hover {
  background: linear-gradient(180deg, #e0bc40 0%, #D4AF37 100%) !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.45), 0 4px 14px rgba(0,0,0,0.45);
}

/* MEETCAP 비로그인 경고 모달 - 검정 + 금색 */
.meetcap-unsaved-box {
  max-width: min(400px, 94vw);
  width: min(400px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  background: #0d0d0d;
  border: 2px solid #c9a227;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(201, 162, 39, 0.15),
    0 0 24px rgba(201, 162, 39, 0.12);
  padding: 28px 24px;
}
.meetcap-unsaved-inner { padding: 0; }
.meetcap-unsaved-msg {
  margin: 0 0 24px 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.meetcap-unsaved-msg strong { color: #c9a227; }
.meetcap-unsaved-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 로그인하고 N개 저장하기: 앰버/호박색 (확인 버튼과 다른 색, 검정·금 테마) */
.meetcap-btn-primary {
  background: linear-gradient(180deg, #B8860B 0%, #996f09 100%) !important;
  color: #f5f0e6 !important;
  border: 2px solid rgba(184, 134, 11, 0.7) !important;
  box-shadow: 0 0 14px rgba(184, 134, 11, 0.3), 0 4px 12px rgba(0,0,0,0.4);
}
.meetcap-btn-primary:hover {
  background: linear-gradient(180deg, #c9970c 0%, #B8860B 100%) !important;
  box-shadow: 0 0 18px rgba(184, 134, 11, 0.4), 0 4px 14px rgba(0,0,0,0.45);
}

/* Coupon shop modal - 검정+금색, 반응형 */
.coupon-box {
  max-width: min(960px, 94vw);
  width: min(960px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  overflow-x: hidden;
  padding: 20px 24px 24px;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(201, 162, 39, 0.12), 0 0 24px rgba(201, 162, 39, 0.1) !important;
  box-sizing: border-box;
}
.coupon-box h2 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #c9a227 !important;
}
.coupon-coin {
  margin: 0 0 18px 0;
  font-size: 16px;
  color: rgba(201, 162, 39, 0.9);
}
.coupon-list {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 20px;
  min-width: 0;
}
.coupon-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 18px;
  padding-top: 28px;
  background: #1a1a1a;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: 12px;
  flex: 1 1 200px;
  min-width: min(220px, 100%);
  max-width: 320px;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .coupon-list {
    flex-direction: column;
    align-items: center;
  }
  .coupon-item {
    width: 100%;
    max-width: 100%;
  }
}
.coupon-item-stock {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  color: rgba(201, 162, 39, 0.9);
}
.coupon-stock-value {
  font-weight: 600;
}
.coupon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 100%;
  height: 100px;
  flex-shrink: 0;
}
.coupon-icon-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.coupon-icon-svg {
  width: 48px;
  height: 48px;
}
.coupon-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a !important;
  background: linear-gradient(180deg, #f5a623 0%, #e8910e 100%) !important;
  border: 2px solid rgba(245, 166, 35, 0.6) !important;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.25);
}
.coupon-buy-btn .coupon-buy-coin {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  vertical-align: middle;
}
.coupon-buy-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffb84d 0%, #f5a623 100%) !important;
  box-shadow: 0 2px 14px rgba(245, 166, 35, 0.35);
}
.coupon-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.coupon-loading,
.coupon-msg {
  padding: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}
.coupon-purchased-wrap {
  margin: 12px 0;
  padding: 12px 16px;
  background: rgba(40, 60, 40, 0.4);
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 8px;
}
.coupon-purchased-wrap.hidden {
  display: none !important;
}
.coupon-purchased-label {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}
.coupon-purchased-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.coupon-purchased-code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 14px;
  background: #1a1a1a;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 6px;
  color: #c9a227;
  word-break: break-all;
}
.coupon-copy-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: #c9a227;
  border-radius: 6px;
  cursor: pointer;
}
.coupon-copy-btn:hover {
  background: rgba(201, 162, 39, 0.3);
}
.coupon-desc {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.coupon-desc p {
  margin: 0 0 6px 0;
}
.coupon-desc p:last-child {
  margin-bottom: 0;
}
#coupon-modal .coupon-close-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}
#coupon-modal .coupon-close-btn {
  margin-left: auto;
  padding: 10px 24px;
  font-size: 14px;
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  color: rgba(201, 162, 39, 0.95) !important;
  border-radius: 8px;
}
#coupon-modal .coupon-close-btn:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}

/* MEETCAP 입장 시 화면 페이드아웃(검은색) */
.meetcap-fade-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  z-index: 99999;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}
.meetcap-fade-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========== 뽑기 모달 (1회/5회 크기 통일, 5회 기준) ========== */
.gacha-box {
  max-width: min(850px, 94vw);
  width: min(850px, 94vw);
  min-width: 0;
  min-height: 400px;
  max-height: min(84vh, calc(100dvh - 32px));
  overflow: hidden;
  padding: 14px 18px 18px;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(201, 162, 39, 0.12), 0 0 32px rgba(201, 162, 39, 0.15) !important;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 데스크톱: 화면 높이가 작으면 모달/상자 크기를 자동 축소 */
@media (min-width: 769px) and (max-height: 900px) {
  .gacha-box {
    max-height: min(82vh, calc(100dvh - 24px));
    padding: 12px 16px 16px;
  }
  .gacha-box h2 {
    font-size: 1.32rem;
    margin-bottom: 4px;
  }
  .gacha-box .gacha-view {
    margin: 4px 0;
  }
  .gacha-chests-row.gacha-chests-one .gacha-chest-mock {
    width: min(248px, 34vh);
    height: min(248px, 34vh);
    max-width: min(248px, 34vh);
    max-height: min(248px, 34vh);
  }
  .gacha-chests-row:not(.gacha-chests-one) .gacha-chest-mock {
    width: min(220px, 31vh);
    height: min(220px, 31vh);
    max-width: min(220px, 31vh);
    max-height: min(220px, 31vh);
    margin: 0 -42px;
  }
}

@media (min-width: 769px) and (max-height: 760px) {
  .gacha-box {
    max-height: min(80vh, calc(100dvh - 16px));
    padding: 10px 14px 14px;
  }
  .gacha-chests-row.gacha-chests-one .gacha-chest-mock {
    width: min(226px, 31vh);
    height: min(226px, 31vh);
    max-width: min(226px, 31vh);
    max-height: min(226px, 31vh);
  }
  .gacha-chests-row:not(.gacha-chests-one) .gacha-chest-mock {
    width: min(198px, 28vh);
    height: min(198px, 28vh);
    max-width: min(198px, 28vh);
    max-height: min(198px, 28vh);
    margin: 0 -36px;
  }
}
.gacha-box img,
.gacha-box .gacha-chest-shake {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.gacha-box .gacha-chest-mock,
.gacha-box .gacha-view {
  pointer-events: auto;
}
.gacha-box h2,
.gacha-box .gacha-top-row,
.gacha-box .gacha-touch-hint,
.gacha-box .gacha-actions-wrap,
.gacha-box #gacha-result {
  flex-shrink: 0;
}
.gacha-insufficient-msg {
  color: #e53935;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin: 8px 0 0;
  flex-shrink: 0;
}
.gacha-insufficient-msg.hidden {
  display: none !important;
}
.gacha-box.gacha-shake {
  animation: gacha-modal-shake 0.52s ease-in-out;
}
@keyframes gacha-modal-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
}
.gacha-box h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: #c9a227 !important;
}
.gacha-touch-hint {
  text-align: center;
  font-size: 1rem;
  color: rgba(201, 162, 39, 0.95);
  margin: 0 0 10px 0;
  font-weight: 600;
  flex-shrink: 0;
}
.gacha-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.gacha-prob-box {
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gacha-prob-title {
  font-weight: 700;
  color: #c9a227;
  margin-bottom: 2px;
}
.gacha-prob-line {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gacha-prob-value {
  font-weight: 600;
  color: rgba(255,255,255,0.95);
}
.gacha-prob-coin {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.gacha-prob-pct {
  color: rgba(201, 162, 39, 0.95);
  margin-left: 2px;
}
.gacha-box .gacha-tickets-row {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}
.gacha-box #gacha-modal-tickets {
  font-weight: 700;
  color: #c9a227;
}
/* 뽑기 모달: 뷰 전환 (1회 / 5회), 1회/5회 같은 모달 높이 유지 */
.gacha-box .gacha-view.hidden {
  display: none !important;
}
/* 1회/5회 동일 모달, 상자·흔들림 모달 정중앙 */
.gacha-box .gacha-view {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}
.gacha-box .gacha-view > .gacha-touch-hint {
  order: 0;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.gacha-box .gacha-view > .gacha-chests-row {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gacha-tickets-row {
  margin-bottom: 0;
}

/* 보상 4칸 (25/100/500/1000) - 네온 테두리, 박스·내부 크게 */
.gacha-reward-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 28px 0;
}
.gacha-reward-box {
  width: 132px;
  height: 132px;
  border-radius: 14px;
  border: 3px solid;
  background: rgba(26, 26, 26, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px 6px;
  box-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
}
/* 숫자 + 코인 한 줄 (줄바꿈 없음), 가깝게 */
.gacha-reward-value-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
/* 확률: 박스 중앙 하단에 가깝게 */
.gacha-reward-box .gacha-reward-prob {
  margin-top: auto;
  text-align: center;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
}
.gacha-reward-25 {
  border-color: #f0f0f0;
  color: #f0f0f0;
  box-shadow: 0 0 14px rgba(240, 240, 240, 0.7), 0 0 28px rgba(240, 240, 240, 0.35);
}
.gacha-reward-100 {
  border-color: #60a5fa;
  color: #60a5fa;
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.8), 0 0 28px rgba(96, 165, 250, 0.4);
}
.gacha-reward-500 {
  border-color: #c084fc;
  color: #c084fc;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.8), 0 0 28px rgba(192, 132, 252, 0.4);
}
.gacha-reward-1000 {
  border-color: #fcd34d;
  color: #fcd34d;
  box-shadow: 0 0 14px rgba(252, 211, 77, 0.8), 0 0 28px rgba(252, 211, 77, 0.4);
}
.gacha-reward-box .gacha-reward-coin {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.gacha-reward-box .gacha-reward-label {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
}

/* ========== 뽑기 상자: 1회 flex 중앙, 5회 가로 꽉 채우고 간격 매우 좁게 ========== */
.gacha-chests-row.gacha-chests-one {
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
}
.gacha-chests-row.gacha-chests-one .gacha-chest-mock {
  width: 266px;
  height: 266px;
  max-width: min(266px, 75vw);
  max-height: min(266px, 45vh);
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 0 auto;
}
/* 5회: 상자 크기 0.9배(240px), 간격(-60px) */
.gacha-chests-row:not(.gacha-chests-one) {
  flex-wrap: nowrap;
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
  gap: 0;
  justify-content: center;
}
.gacha-chests-row:not(.gacha-chests-one) .gacha-chest-mock {
  width: 240px;
  height: 240px;
  max-width: min(240px, 75vw);
  max-height: min(240px, 45vh);
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0 -48px;
}
.gacha-chests-row:not(.gacha-chests-one) {
  min-width: 0;
  max-width: 100%;
}
.gacha-chests-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  box-sizing: border-box;
}
.gacha-chest-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.gacha-chest-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gacha-chest-swirl {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130%;
  height: 130%;
  margin-left: -65%;
  margin-top: -65%;
  background: center/contain no-repeat;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}
/* 1원은 소용돌이 표시하지 않음 */
.gacha-chest-mock[data-draw-value="1"] .gacha-chest-swirl { background-image: none; }
.gacha-chest-mock[data-draw-value="25"] .gacha-chest-swirl { background-image: url("../assets/items/gacha_swirl_25.png"); }
.gacha-chest-mock[data-draw-value="100"] .gacha-chest-swirl { background-image: url("../assets/items/gacha_swirl_100.png"); }
.gacha-chest-mock[data-draw-value="500"] .gacha-chest-swirl { background-image: url("../assets/items/gacha_swirl_500.png"); }
.gacha-chest-mock[data-draw-value="1000"] .gacha-chest-swirl { background-image: url("../assets/items/gacha_swirl_1000.png"); }
.gacha-chest-mock[data-state="shaking"] .gacha-chest-swirl {
  visibility: visible;
  animation: gacha-swirl-rotate 4s linear infinite;
}
.gacha-chest-mock[data-state="flashing"] .gacha-chest-swirl {
  visibility: visible;
  animation: gacha-swirl-rotate 4s linear infinite;
  filter: brightness(1.6);
  transition: opacity 0.25s ease, filter 0.2s ease;
}
.gacha-chest-mock[data-state="result"] .gacha-chest-swirl,
.gacha-chest-mock[data-state="idle"] .gacha-chest-swirl {
  visibility: hidden;
  opacity: 0;
  animation: none;
}
@keyframes gacha-swirl-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.gacha-chest-idle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
}
.gacha-chest-shake,
.gacha-chest-result {
  z-index: 1;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 뽑기 전: 기본 상자(idle)만 표시. 터치 후: 빛나는 상자로 바꿔서 달그락 + 플래시 */
.gacha-chest-mock[data-state="result"] .gacha-chest-idle { visibility: hidden; }
.gacha-chest-mock[data-state="shaking"] .gacha-chest-idle,
.gacha-chest-mock[data-state="flashing"] .gacha-chest-idle { visibility: hidden; }
@keyframes chest-shake-code {
  0%, 100% { transform: scale(0.92, 1.08) translateX(0) rotate(0deg); }
  25% { transform: scale(0.92, 1.08) translateX(-4px) rotate(-2deg); }
  75% { transform: scale(0.92, 1.08) translateX(4px) rotate(2deg); }
}
.gacha-chest-shake {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  pointer-events: none;
  background: url("../assets/items/chest_shining.png") center/contain no-repeat;
}
.gacha-chest-mock[data-draw-value="1000"] .gacha-chest-shake {
  background-image: url("../assets/items/chest_shining_gold.png");
}
.gacha-chest-mock[data-state="shaking"] .gacha-chest-shake {
  visibility: visible;
  filter: brightness(1.5);
  animation: chest-shake-code 0.16s ease-in-out infinite;
}
.gacha-chest-mock[data-state="flashing"] .gacha-chest-shake {
  visibility: visible;
  animation: none;
  filter: brightness(3.2);
  transform: scale(0.92, 1.08);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.gacha-chest-mock[data-state="idle"] .gacha-chest-shake,
.gacha-chest-mock[data-state="result"] .gacha-chest-shake { visibility: hidden; }
.gacha-chest-result {
  visibility: hidden;
  padding: 10px 14px;
  border-radius: 12px;
  border: 3px solid #e8e8e8;
  background: rgba(26, 26, 26, 0.95);
  box-shadow: 0 0 14px rgba(240, 240, 240, 0.5), 0 0 28px rgba(240, 240, 240, 0.25);
  gap: 6px;
  white-space: nowrap;
  aspect-ratio: 1;
  min-width: 72px;
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gacha-chest-result[data-coin="1"] {
  border-color: #f0f0f0;
  background: rgba(252, 252, 252, 0.95);
  box-shadow: 0 0 14px rgba(240, 240, 240, 0.7), 0 0 28px rgba(240, 240, 240, 0.35);
}
.gacha-chest-result[data-coin="25"] {
  border-color: #7cb342;
  background: rgba(225, 245, 200, 0.95);
  box-shadow: 0 0 14px rgba(124, 179, 66, 0.8), 0 0 28px rgba(124, 179, 66, 0.4);
}
.gacha-chest-result[data-coin="100"] {
  border-color: #60a5fa;
  background: rgba(220, 238, 255, 0.95);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.8), 0 0 28px rgba(96, 165, 250, 0.4);
}
.gacha-chest-result[data-coin="500"] {
  border-color: #c084fc;
  background: rgba(242, 230, 255, 0.95);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.8), 0 0 28px rgba(192, 132, 252, 0.4);
}
.gacha-chest-result[data-coin="1000"] {
  border-color: #fcd34d;
  background: rgba(255, 250, 230, 0.95);
  box-shadow: 0 0 14px rgba(252, 211, 77, 0.8), 0 0 28px rgba(252, 211, 77, 0.4);
}
.gacha-chest-mock[data-state="result"] .gacha-chest-result {
  visibility: visible;
  position: relative;
  inset: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: gacha-result-appear 0.4s ease-out forwards;
}
@keyframes gacha-result-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.gacha-chest-result .gacha-result-value {
  font-size: clamp(14px, 4vw, 22px);
  font-weight: 700;
  color: #fff;
}
.gacha-chest-result[data-coin="1"] .gacha-result-value { color: #2a2a2a; }
.gacha-chest-result[data-coin="25"] .gacha-result-value { color: #2d4a1a; }
.gacha-chest-result[data-coin="100"] .gacha-result-value { color: #1e3a6e; }
.gacha-chest-result[data-coin="500"] .gacha-result-value { color: #4c1d95; }
.gacha-chest-result[data-coin="1000"] .gacha-result-value { color: #78350f; }
.gacha-chest-result .gacha-result-coin {
  width: clamp(20px, 5vw, 32px);
  height: clamp(20px, 5vw, 32px);
  object-fit: contain;
  flex-shrink: 0;
}

/* 버튼: 1회/5회 중앙 하단, 닫기 오른쪽 아래 구석 */
.gacha-actions-wrap {
  position: relative;
  min-height: 52px;
  margin-top: 28px;
  padding-bottom: 8px;
}
.gacha-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.gacha-box .gacha-btn-close {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  color: rgba(201, 162, 39, 0.95) !important;
  padding: 8px 20px;
  border-radius: 8px;
}
.gacha-box .gacha-btn-draw {
  background: linear-gradient(180deg, #f5a623 0%, #e8910e 100%) !important;
  color: #1a1a1a !important;
  border: 2px solid rgba(245, 166, 35, 0.6) !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.25);
}
.gacha-box .gacha-btn-draw:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffb84d 0%, #f5a623 100%) !important;
  box-shadow: 0 2px 14px rgba(245, 166, 35, 0.35);
}
.gacha-box .gacha-btn-close:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}
.gacha-box .gacha-btn-draw:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.gacha-box #gacha-result.gacha-result-area {
  margin-top: 14px;
  min-height: 36px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
}
.gacha-product-list {
  margin: 14px 0;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}
.gacha-product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.gacha-product-item img.gacha-product-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.gacha-product-miss {
  color: rgba(201, 162, 39, 0.8);
}

/* Shop - 옷가게 모달 검정+금색, 반응형 */
.shop-box {
  width: min(720px, 94vw);
  max-width: min(720px, 94vw);
  min-width: 280px;
  max-height: 88vh;
  overflow: hidden;
  background: #0d0d0d !important;
  border: 2px solid #c9a227 !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(201, 162, 39, 0.12), 0 0 24px rgba(201, 162, 39, 0.1) !important;
  box-sizing: border-box;
}
.shop-box h2 {
  color: #c9a227 !important;
}
.shop-box #shop-close {
  background: #1a1a1a !important;
  border: 2px solid rgba(201, 162, 39, 0.5) !important;
  color: rgba(201, 162, 39, 0.95) !important;
  padding: 8px 20px;
  border-radius: 8px;
}
.shop-box #shop-close:hover {
  background: #252525 !important;
  color: #c9a227 !important;
  border-color: rgba(201, 162, 39, 0.6) !important;
}
#shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 24px;
  padding: 16px;
  background: #1a1a1a;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, 0.25);
}
@media (max-width: 480px) {
  #shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }
}

.shop-item {
  background: #252525;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: 12px;
  padding: 0;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.shop-item:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 39, 0.6);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.15);
}

.shop-item .item-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.shop-item .item-name {
  font-size: 12px;
  font-weight: 500;
  padding: 10px 8px 4px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.shop-item .item-price {
  font-size: 13px;
  font-weight: 600;
  color: #c9a227;
  padding-bottom: 10px;
}

/* 모바일: 조이스틱 왼쪽 (왼손 조작) */
#joystick-wrap {
  display: none;
  position: fixed;
  bottom: 12%;
  left: 6%;
  z-index: 30;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#joystick-wrap > * {
  pointer-events: auto;
}
#joystick-base {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(40, 32, 24, 0.78);
  border: 3px solid rgba(212, 165, 116, 0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 0 2px rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
#joystick-stick {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8B6914 0%, #6d5010 100%);
  border: 2px solid rgba(212, 165, 116, 0.6);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  position: relative;
  left: 0;
  top: 0;
  transition: transform 0.05s ease-out;
}
@media (max-width: 768px) {
  #joystick-wrap {
    display: flex;
  }
}

.mobile-only {
  display: none !important;
}
@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }
  .mobile-only.hidden {
    display: none !important;
  }
}

/* PC: 감옥 앞 E 키 안내 (눈에 띄게) */
.jail-e-key-hint {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 32;
  font-size: 15px;
  font-weight: 600;
  color: #f5f0e6;
  background: rgba(45, 45, 55, 0.92);
  padding: 10px 20px;
  border-radius: 14px;
  border: 2px solid rgba(212, 165, 116, 0.65);
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  pointer-events: none;
  font-family: inherit;
}
.jail-e-key-hint kbd {
  display: inline-block;
  min-width: 28px;
  padding: 4px 8px;
  margin: 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #f5f0e6;
  background: linear-gradient(180deg, #5a4a2a 0%, #3d3318 100%);
  border: 2px solid rgba(212, 165, 116, 0.7);
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.jail-e-key-hint.hidden {
  display: none !important;
}
@media (max-width: 768px) {
  .jail-e-key-hint {
    display: none !important;
  }
}

#jail-release-btn {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 31;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #f5f0e6;
  background: linear-gradient(180deg, #6d5010 0%, #5a4208 100%);
  border: 2px solid rgba(212, 165, 116, 0.6);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  touch-action: manipulation;
  pointer-events: auto;
  cursor: pointer;
  font-family: inherit;
}
#jail-release-btn.hidden {
  display: none !important;
}
#jail-release-btn.disabled,
#jail-release-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
#jail-release-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}
@media (max-width: 768px) {
  #jail-release-btn {
    left: auto;
    top: auto;
    right: 6%;
    bottom: 12%;
    transform: none;
  }
  #jail-release-btn:active:not(:disabled) {
    transform: scale(0.96);
  }
}

/* ========== 모달 반응형 (모바일·작은 화면, 좌우 스크롤 없이 한 화면에) ========== */
@media (max-width: 768px) {
  .gacha-box {
    width: 94vw;
    max-width: 94vw;
  }
  .gacha-chests-row.gacha-chests-one .gacha-chest-mock {
    width: min(266px, 72vw);
    height: min(266px, 72vw);
    max-width: min(266px, 72vw);
    max-height: min(266px, 45vh);
  }
  .gacha-chests-row:not(.gacha-chests-one) .gacha-chest-mock {
    width: min(240px, 17.5vw);
    height: min(240px, 17.5vw);
    max-width: min(240px, 17.5vw);
    max-height: min(240px, 38vh);
    margin: 0 -2.8vw;
  }
  .gacha-chests-row:not(.gacha-chests-one) {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 640px) {
  .modal {
    padding: 8px;
    align-items: center;
    justify-content: center;
  }
  .modal-box {
    padding: 16px 20px;
    max-height: 85vh;
    max-width: 94vw;
    width: 94vw;
  }
  .gacha-box {
    padding: 12px 16px 16px;
    width: 94vw;
    max-width: 94vw;
  }
  .gacha-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .gacha-prob-box {
    padding: 6px 10px;
    font-size: 11px;
  }
  .home-status-box {
    max-width: 94vw;
    width: 94vw;
  }
  .home-status-layout {
    flex-direction: column;
    gap: 16px;
    min-height: 0;
  }
  .home-status-left,
  .home-status-right {
    flex: 0 0 auto;
    min-width: 0;
  }
  .shop-box {
    max-width: 94vw;
    width: 94vw;
  }
  #shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .coupon-box {
    max-width: 94vw;
    width: 94vw;
  }
  .coupon-list {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    max-height: none;
  }
  .coupon-item {
    min-width: 0;
    flex: 1 1 140px;
  }
  .meetcap-confirm-box {
    max-width: 94vw;
    width: 94vw;
  }
}
