/* g-gun.css — 장전하고 쏘세요 (기획 · 평범한 사람들)
   기획서(game_vibe/20260818105033.pdf) 3·4쪽 그림 그대로:
   시작 화면(총 그림 · 노란 형광펜 제목 · PLAY · 상점 · 단계 표 1~7),
   플레이 화면(시간 막대 · 멈추기/나가기/상점 · 힘/점수/돈 · 몬스터 · 키보드와 두 손),
   끝 화면(표 + 다시하기/다음 단계), 상점(총 3종 · 랜덤 스킨 뽑기).

   크기 단위 --u
     화면 높이(vh)로 잡으면 「⌨️ 자판」을 켰을 때 게임판만 낮아지는데 글자·그림은
     그대로여서 판이 깨진다. 그래서 g-gun.js 가 무대(#stage) 높이의 1% 를 --u 로 넣어 준다.
     이 파일의 세로 크기는 전부 var(--u, 1vh) 로 잡는다 (JS 가 못 넣으면 1vh 로 떨어진다).
   1366×768 크롬북과 전자칠판 모두, 자판 안내를 켜도 스크롤 없이 한 화면. */

/* =========================================================
   시작 화면
   ========================================================= */
.gun-introbg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #1d2740 0%, #0a0e16 72%),
    linear-gradient(180deg, rgba(226, 80, 79, .10), transparent 40%);
}
.gun-introbox {
  position: relative; margin-top: calc(3.4 * var(--u, 1vh)); text-align: center;
  max-width: 60em;
  padding: clamp(6px, calc(1.2 * var(--u, 1vh)), 16px) clamp(18px, 3vw, 40px);
}
.gun-bigun { line-height: 0; }
.gun-gunsvg {
  width: clamp(104px, calc(18 * var(--u, 1vh)), 210px); height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
  transform: rotate(-12deg);
}
.gun-gunsvg.sm { width: clamp(52px, calc(6.6 * var(--u, 1vh)), 84px); transform: none; }
.gun-gunsvg.xs { width: clamp(32px, calc(4.2 * var(--u, 1vh)), 48px); transform: none; }
.gun-minigun { width: clamp(28px, calc(3.6 * var(--u, 1vh)), 42px); height: auto; }

/* 노란 형광펜 느낌의 제목 */
.gun-title {
  margin: calc(.2 * var(--u, 1vh)) 0 calc(1 * var(--u, 1vh));
  font-size: clamp(26px, calc(6 * var(--u, 1vh)), 62px);
  font-weight: 900; color: #1a1305; letter-spacing: -.01em;
}
.gun-title span {
  display: inline-block; padding: 2px 18px 4px;
  background: linear-gradient(180deg, #ffe86a 0%, #f7d02c 55%, #ffe86a 100%);
  border-radius: 10px 26px 12px 22px;
  box-shadow: 0 6px 18px rgba(247, 208, 44, .28);
  transform: rotate(-1.2deg);
}
.gun-introdesc {
  color: #e6eefc; font-size: clamp(12px, calc(2 * var(--u, 1vh)), 19px);
  line-height: 1.5; font-weight: 600;
  margin-bottom: calc(1.2 * var(--u, 1vh));
}
.gun-introdesc b { color: #ffd977; }

.gun-play {
  display: inline-block; cursor: pointer;
  padding: clamp(5px, calc(1.1 * var(--u, 1vh)), 12px) clamp(42px, 7vw, 96px);
  font-size: clamp(22px, calc(4.6 * var(--u, 1vh)), 48px); font-weight: 900; letter-spacing: .14em;
  color: #1a1305;
  background: linear-gradient(180deg, #ffe86a, #f2c520);
  border: 3px solid #1a1305; border-radius: 14px;
  box-shadow: 0 8px 0 #b98e0d, 0 14px 26px rgba(0, 0, 0, .45);
  transform: rotate(-.8deg);
}
.gun-play:hover { filter: brightness(1.06); }
.gun-play:active { transform: rotate(-.8deg) translateY(4px); box-shadow: 0 4px 0 #b98e0d; }

/* 오른쪽 위 작은 상점 상자 (기획서 그림) */
.gun-introshop {
  position: absolute; top: calc(1.8 * var(--u, 1vh)); right: 2vw; z-index: 3; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 14px 5px;
  background: rgba(12, 17, 26, .92); border: 3px solid #e6eefc; border-radius: 12px;
  color: #fff;
}
.gun-introshop b { font-size: clamp(12px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 900; }
.gun-introshop:hover { background: #1a2436; }

/* 단계 표 1~7 */
.gun-lvbox {
  margin: calc(1.6 * var(--u, 1vh)) auto 0; max-width: 46em;
  border: 3px solid #e6eefc; border-radius: 10px; overflow: hidden;
  background: rgba(10, 14, 21, .8);
}
.gun-lvhd {
  font-size: clamp(11px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 900; color: #0b0f17;
  background: #cfd9ea; padding: 2px 0; letter-spacing: .2em;
}
.gun-lvrow { display: grid; grid-template-columns: repeat(7, 1fr); }
.gun-lvc {
  cursor: pointer; border: 0; border-right: 2px solid #0b0f17;
  padding: clamp(2px, calc(.8 * var(--u, 1vh)), 9px) 0;
  font-size: clamp(14px, calc(2.4 * var(--u, 1vh)), 24px); font-weight: 900; color: #12161f;
  background: var(--lc); filter: saturate(.9) brightness(.86);
}
.gun-lvc:last-child { border-right: 0; }
.gun-lvc.sel { filter: none; box-shadow: inset 0 0 0 3px #fff; }
.gun-lvc:hover { filter: saturate(.85) brightness(.92); }
.gun-lvrow.names { border-top: 2px solid #0b0f17; }
.gun-lvn {
  padding: clamp(2px, calc(.7 * var(--u, 1vh)), 8px) 2px; text-align: center;
  font-size: clamp(9px, calc(1.4 * var(--u, 1vh)), 13px); font-weight: 700; color: #8fa0bb;
  border-right: 2px solid #1a2130; line-height: 1.25;
}
.gun-lvn:last-child { border-right: 0; }
.gun-lvn.sel { color: #ffe86a; }

/* =========================================================
   플레이 화면
   ========================================================= */
.gun-wrap {
  --gc1: #c9d3e2;
  --gc2: #6b7688;
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 50% 0%, #1b2233 0%, #0a0e16 74%);
}

/* ---------- 시간 막대 (빨강·주황·노랑·연두 + 끝에 남은 초) ---------- */
.gun-timebar {
  position: relative; flex: 0 0 auto;
  height: clamp(16px, calc(3 * var(--u, 1vh)), 30px);
  margin: clamp(4px, calc(.8 * var(--u, 1vh)), 10px) clamp(8px, 1.2vw, 18px) 0;
  border: 3px solid #0b0f17; border-radius: 6px; overflow: hidden;
  background: #10151f;
}
.gun-tsegs { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.gun-tsegs i { display: block; border-right: 3px solid #0b0f17; }
.gun-tsegs i:last-child { border-right: 0; }
.gun-tmask {
  position: absolute; top: 0; right: 0; bottom: 0; width: 0;
  background: #10151f;
  border-left: 3px solid rgba(255, 255, 255, .55);
}
.gun-tsec {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 900; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9); font-variant-numeric: tabular-nums;
}
.gun-tsec.low { color: #ff9aad; animation: gunLow 1s infinite ease-in-out; }
@keyframes gunLow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- 가운데 판 ---------- */
.gun-field {
  position: relative; flex: 1 1 auto; min-height: 0;
  margin: clamp(3px, calc(.7 * var(--u, 1vh)), 10px) clamp(8px, 1.2vw, 18px) 0;
  cursor: crosshair; overflow: hidden;
}

/* 왼쪽 위 버튼 — 한 줄로 못 박는다.
   (예전에 max-width 15em + wrap 이라서 1920 에서 「상점」이 두 번째 줄로 떨어졌다) */
.gun-lbtns {
  position: absolute; left: 0; top: 0; z-index: 4;
  display: flex; flex-wrap: nowrap; gap: clamp(4px, .5vw, 8px);
  max-width: none; white-space: nowrap;
}
.gun-b {
  cursor: pointer; font-weight: 900; color: #0b0f17; white-space: nowrap;
  border: 3px solid #0b0f17; border-radius: 9px;
  padding: clamp(2px, calc(.6 * var(--u, 1vh)), 7px) clamp(7px, 1vw, 15px);
  font-size: clamp(11px, calc(1.8 * var(--u, 1vh)), 18px);
  background: #dfe7f3; box-shadow: 0 3px 0 rgba(0, 0, 0, .45);
}
.gun-b:hover { filter: brightness(1.08); }
.gun-b:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
.gun-b.gun-stop { background: #ffe0e0; }
.gun-b.gun-out { background: #ffd9f0; }
.gun-b.gun-shopb { background: #ffe86a; }
.gun-b.gun-close { background: #cfd9ea; }
.gun-b.gun-buy { background: #a8e6b8; margin-top: 4px; width: 100%; }
.gun-b.gun-draw { background: #ffcc5c; font-size: clamp(13px, calc(2.1 * var(--u, 1vh)), 20px); }
.gun-b.gun-again { background: #ffe86a; }
.gun-b.gun-next { background: #a8e6b8; }

/* 오른쪽 위 힘 / 점수 / 돈
   숫자는 「장전할 낱말」(4.4u) 의 0.7배 아래로 — 화면에서 제일 큰 글자는 낱말이어야 한다 */
.gun-rstats {
  position: absolute; right: 0; top: 0; z-index: 4;
  display: flex; flex-direction: column; gap: 4px; align-items: stretch;
}
.gun-s {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  min-width: clamp(96px, 11vw, 150px);
  padding: clamp(1px, calc(.4 * var(--u, 1vh)), 5px) clamp(7px, .9vw, 12px);
  border: 3px solid #0b0f17; border-radius: 9px; color: #12161f;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .45);
}
.gun-s b { font-size: clamp(11px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 900; }
.gun-s span {
  font-size: clamp(13px, calc(2.2 * var(--u, 1vh)), 21px); font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.gun-s.pw { background: #f8a33c; }
.gun-s.sc { background: #64b5f0; }
.gun-s.mn { background: #b7dd58; }

/* 몬스터 */
.gun-mon {
  position: absolute; left: 50%; bottom: 34%;
  width: clamp(96px, calc(22 * var(--u, 1vh)), 210px);
  transform: translate(-50%, var(--bob, 0px));
  z-index: 3; line-height: 0;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
}
.gun-mon.flip .gun-monsvg { transform: scaleX(-1); }
.gun-monsvg { width: 100%; height: auto; }
.gun-mon.dead { animation: gunPop .42s forwards ease-out; pointer-events: none; }
@keyframes gunPop {
  0% { transform: translate(-50%, 0) scale(1) rotate(0); opacity: 1; }
  40% { transform: translate(-50%, -14px) scale(1.16) rotate(-9deg); }
  100% { transform: translate(-50%, 22px) scale(.5) rotate(22deg); opacity: 0; }
}
.gun-mon.in { animation: gunIn .34s ease-out; }
@keyframes gunIn {
  from { transform: translate(-50%, 26px) scale(.5); opacity: 0; }
  to { transform: translate(-50%, 0) scale(1); opacity: 1; }
}
/* 기획서의 말풍선 — 좌우로 움직인다는 것까지 여기서 알려 준다 */
.gun-monsay {
  position: absolute; left: 50%; top: -13%;
  transform: translateX(-50%); white-space: nowrap;
  padding: 2px 9px; border-radius: 999px 999px 4px 999px;
  background: rgba(230, 238, 252, .92); color: #12161f;
  font-size: clamp(9px, calc(1.4 * var(--u, 1vh)), 14px); font-weight: 800; line-height: 1.2;
}
.gun-ground {
  position: absolute; left: 2%; right: 2%; bottom: 33%;
  height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #8fa0bb 12%, #8fa0bb 88%, transparent);
  opacity: .8;
}

/* 「마우스로 쏘라」 를 게임판에서 알려 준다 — 총알이 있을 때만 밝게 */
.gun-hint {
  position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%);
  z-index: 4; pointer-events: none; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
  padding: clamp(2px, calc(.5 * var(--u, 1vh)), 6px) clamp(10px, 1.4vw, 18px);
  border-radius: 999px; border: 2px solid #2f3a4d;
  background: rgba(10, 14, 21, .8);
  font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 800; color: #8fa0bb;
}
.gun-hint b { font-weight: 900; }
.gun-hint.ready {
  border-color: #ffe86a; color: #1a1305;
  background: linear-gradient(180deg, #ffe86a, #f5cf2a);
  box-shadow: 0 0 18px rgba(255, 232, 106, .35);
  animation: gunHint 1.3s infinite ease-in-out;
}
@keyframes gunHint {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

/* 탄창 = 힘 (오른쪽 위 표시와 같은 이름·같은 숫자) */
.gun-magbox {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  padding: 2px 13px; border-radius: 999px;
  background: rgba(10, 14, 21, .82); border: 2px solid #2f3a4d;
}
.gun-magbox.shake { animation: gunShake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes gunShake {
  10%, 90% { transform: translateX(calc(-50% - 3px)); }
  30%, 70% { transform: translateX(calc(-50% + 5px)); }
  50% { transform: translateX(calc(-50% - 6px)); }
}
.gun-maglb {
  font-size: clamp(10px, calc(1.5 * var(--u, 1vh)), 14px); font-weight: 900; color: #f8a33c;
}
.gun-magnum {
  font-size: clamp(11px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 900; color: #e6eefc;
  font-variant-numeric: tabular-nums;
}
.gun-mag { display: flex; gap: 4px; }
.gun-mag i {
  display: block;
  width: clamp(7px, calc(1.1 * var(--u, 1vh)), 13px);
  height: clamp(15px, calc(2.6 * var(--u, 1vh)), 28px);
  border-radius: 4px 4px 2px 2px;
  background: #253044; border: 2px solid #38455c;
}
.gun-mag i.on {
  background: linear-gradient(180deg, var(--gc1), var(--gc2));
  border-color: #2b241d;
  box-shadow: 0 0 8px rgba(255, 216, 120, .5);
}

/* 대기시간 5초 — 몬스터 얼굴을 덮지 않게 판 위쪽 가운데 (버튼 두 무리 사이) */
.gun-wait {
  position: absolute; left: 50%; top: 1%; transform: translateX(-50%);
  z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  padding: clamp(2px, calc(.5 * var(--u, 1vh)), 7px) clamp(12px, 1.6vw, 22px);
  border-radius: 999px; background: rgba(10, 14, 21, .86); border: 3px solid #ffe86a;
}
.gun-wait.off, .gun-wait:empty { display: none; }
.gun-wait b {
  font-size: clamp(20px, calc(3.6 * var(--u, 1vh)), 38px); font-weight: 900; color: #ffe86a;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.gun-wait span {
  font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 800; color: #e6eefc;
}

/* 멈춤 */
.gun-paused {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(6, 9, 14, .72);
}
.gun-paused b { font-size: clamp(26px, calc(5 * var(--u, 1vh)), 58px); font-weight: 900; color: #ffe86a; }
.gun-paused span { font-size: clamp(12px, calc(2 * var(--u, 1vh)), 19px); font-weight: 700; color: #cfd9ea; }

/* 총알 자국 / 점수 표시 */
.gun-mark {
  position: absolute; z-index: 5; pointer-events: none;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 3px solid #8fa0bb;
  animation: gunMark .42s forwards ease-out;
}
.gun-mark.ok { border-color: #ffe86a; box-shadow: 0 0 18px rgba(255, 232, 106, .8); }
@keyframes gunMark {
  from { transform: scale(.3); opacity: 1; }
  to { transform: scale(2.1); opacity: 0; }
}
.gun-pop {
  position: absolute; z-index: 6; pointer-events: none;
  transform: translate(-50%, -50%); white-space: nowrap;
  font-size: clamp(14px, calc(2.5 * var(--u, 1vh)), 26px); font-weight: 900; color: #b7dd58;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
  animation: gunPopUp .9s forwards ease-out;
}
@keyframes gunPopUp {
  0% { transform: translate(-50%, -50%) scale(.7); opacity: 0; }
  25% { transform: translate(-50%, -80%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -160%) scale(1); opacity: 0; }
}

/* =========================================================
   키보드와 두 손 (기획서 아래쪽 그림) + 키캡 위의 낱말
   ========================================================= */
.gun-kbwrap {
  position: relative; flex: 0 0 auto;
  height: clamp(92px, calc(21 * var(--u, 1vh)), 190px);
  margin: 0 clamp(8px, 1.2vw, 18px);
  perspective: 620px; overflow: hidden;
}
/* 「⌨️ 자판」을 켜면 아래에 진짜 자판 안내가 붙는다 —
   그림 자판·두 손은 접고 낱말 카드만 남긴다 (한 화면에 들어가게) */
.gun-wrap.kbmini .gun-kbwrap { height: clamp(46px, calc(9.5 * var(--u, 1vh)), 84px); }
.gun-wrap.kbmini .gun-kb,
.gun-wrap.kbmini .gun-handsvg { display: none; }
.gun-wrap.kbmini .gun-cards { align-items: center; padding-top: 0; }

.gun-kb {
  position: absolute; left: 6%; right: 6%; bottom: 0;
  transform: rotateX(50deg); transform-origin: 50% 100%;
  padding: clamp(4px, calc(.9 * var(--u, 1vh)), 12px) clamp(10px, 2vw, 26px) clamp(5px, calc(1.1 * var(--u, 1vh)), 14px);
  border-radius: 10px;
  background: linear-gradient(180deg, #c99a67, #a4703f);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, .5);
}
.gun-krow {
  display: flex; justify-content: center;
  gap: clamp(3px, .5vw, 7px); margin-bottom: clamp(2px, calc(.5 * var(--u, 1vh)), 7px);
}
.gun-key {
  flex: 0 0 auto;
  width: clamp(20px, 3.2vw, 46px); height: clamp(16px, calc(2.6 * var(--u, 1vh)), 34px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px; background: linear-gradient(180deg, #f4ead9, #dcc7a6);
  border: 1px solid #2b241d; color: #2b241d;
  font-size: clamp(8px, calc(1.3 * var(--u, 1vh)), 14px); font-weight: 800;
}
.gun-key.space { width: 48%; }

.gun-handsvg {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: clamp(130px, 17%, 300px); height: auto; z-index: 3;
  filter: drop-shadow(0 -4px 12px rgba(0, 0, 0, .5));
  pointer-events: none;
}

/* 키캡 위에 세워진 낱말 카드 — 화면에서 제일 큰 글자 */
.gun-cards {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(6px, 1.4vw, 26px);
  padding-top: clamp(2px, calc(.5 * var(--u, 1vh)), 8px);
}
.gun-card {
  display: inline-flex; align-items: center; justify-content: center;
  padding: clamp(2px, calc(.7 * var(--u, 1vh)), 9px) clamp(8px, 1.2vw, 18px);
  border: 3px solid #2b241d; border-radius: 5px;
  font-weight: 900; color: #2a2013; line-height: 1.15;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
  transform: rotate(-2deg);
  max-width: 22%;
}
.gun-card:empty { visibility: hidden; }
.gun-card.p2 { background: #d9a86a; font-size: clamp(10px, calc(1.6 * var(--u, 1vh)), 16px); opacity: .55; transform: rotate(2deg); }
.gun-card.p1 { background: #f0a3c0; font-size: clamp(10px, calc(1.8 * var(--u, 1vh)), 18px); opacity: .7; }
.gun-card.n1 { background: #f5b45c; font-size: clamp(10px, calc(1.8 * var(--u, 1vh)), 18px); }
.gun-card.n2 { background: #e2c464; font-size: clamp(10px, calc(1.6 * var(--u, 1vh)), 16px); opacity: .8; transform: rotate(2deg); }
.gun-card.now {
  background: linear-gradient(180deg, #ffe86a, #f5cf2a);
  font-size: clamp(20px, calc(4.4 * var(--u, 1vh)), 42px);
  padding: clamp(3px, calc(.9 * var(--u, 1vh)), 12px) clamp(14px, 2vw, 30px);
  border-width: 4px; transform: rotate(-1deg);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .4), 0 0 26px rgba(255, 232, 106, .35);
  max-width: 36%;
}
.gun-card.now.lock { box-shadow: 0 7px 0 rgba(0, 0, 0, .4), 0 0 0 4px #0e9c78; }
.gun-card.now.load { animation: gunLoad .32s ease-out; }
@keyframes gunLoad {
  0% { transform: rotate(-1deg) scale(1); }
  45% { transform: rotate(-1deg) scale(1.16); filter: brightness(1.3); }
  100% { transform: rotate(-1deg) scale(1); }
}
/* 이미 친 글자 — 여섯 게임 공통 색 */
.gun-card.now .hit { color: #0e9c78; }

/* =========================================================
   상점
   ========================================================= */
.gun-shopwrap {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 13, .82); padding: calc(1.2 * var(--u, 1vh)) 1vw;
}
.gun-shopbox {
  width: min(1120px, 98%); max-height: 96%;
  display: flex; flex-direction: column;
  background: #0f141d; border: 4px solid #e6eefc; border-radius: 14px; overflow: hidden;
}
.gun-shophd {
  display: flex; align-items: center; gap: 14px;
  padding: clamp(3px, calc(.8 * var(--u, 1vh)), 10px) clamp(10px, 1.4vw, 20px);
  background: #cfd9ea; color: #0b0f17;
}
.gun-shophd > b { font-size: clamp(15px, calc(2.6 * var(--u, 1vh)), 26px); font-weight: 900; letter-spacing: .1em; }
.gun-shopmn {
  margin-left: auto; font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 800;
  background: #b7dd58; border: 3px solid #0b0f17; border-radius: 8px; padding: 1px 12px;
}
.gun-shopmn i { font-style: normal; font-weight: 900; }
.gun-shopbody { overflow-y: auto; padding: clamp(5px, calc(1.1 * var(--u, 1vh)), 14px) clamp(10px, 1.4vw, 20px); }
.gun-shopsec { margin-bottom: clamp(5px, calc(1.1 * var(--u, 1vh)), 14px); }
.gun-shopsec h4 {
  margin: 0 0 5px; font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 900; color: #ffe86a;
}
.gun-shopsec h4 em { font-style: normal; color: #8fa0bb; font-size: .82em; margin-left: 8px; }

.gun-gunrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1vw, 14px); }
.gun-gcard {
  text-align: center; padding: clamp(3px, calc(.7 * var(--u, 1vh)), 10px);
  border: 3px solid #2f3a4d; border-radius: 10px; background: #151c28; color: #e6eefc;
}
.gun-gcard.on { border-color: #ffe86a; background: #1e2536; }
.gun-gpic { position: relative; line-height: 0; }
.gun-gprice {
  position: absolute; right: 6%; top: 2px; display: inline-block;
  background: #fff; color: #0b0f17; border: 2px solid #0b0f17; border-radius: 6px;
  padding: 1px 9px; font-size: clamp(10px, calc(1.6 * var(--u, 1vh)), 15px); font-weight: 900;
  line-height: 1.5; transform: rotate(-9deg);
}
.gun-gcard b { display: block; font-size: clamp(12px, calc(2.1 * var(--u, 1vh)), 20px); font-weight: 900; }
.gun-gammo { font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 800; color: #b7dd58; }
.gun-gnote { display: block; font-size: clamp(10px, calc(1.5 * var(--u, 1vh)), 14px); color: #8fa0bb; font-weight: 700; }

.gun-gachabox { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(8px, 1.2vw, 18px); }
.gun-gachaL {
  border: 3px solid #2f3a4d; border-radius: 10px; padding: clamp(3px, calc(.7 * var(--u, 1vh)), 10px);
  text-align: center; background: #151c28;
}
.gun-skinstrip { display: flex; justify-content: center; gap: 4px; margin-bottom: 5px; }
.gun-skchip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3px 8px 2px; border: 2px solid #0b0f17; border-radius: 8px;
  background: #0e131c;
}
.gun-skchip em {
  font-style: normal; font-size: clamp(9px, calc(1.3 * var(--u, 1vh)), 12px); font-weight: 900; line-height: 1.3;
}
.gun-drawout { margin-top: 5px; min-height: 2.1em; font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 800; }
.gun-drawout .bad { color: #ff9aad; }
.gun-drawout .got {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  color: #e6eefc; border: 2px solid var(--rc); border-radius: 10px; padding: 3px 12px;
}
.gun-drawout .got b { color: var(--rc); }
.gun-drawout .got em { font-style: normal; color: #8fa0bb; }

.gun-gachaR { border: 3px solid #2f3a4d; border-radius: 10px; padding: clamp(3px, calc(.7 * var(--u, 1vh)), 10px); background: #151c28; }
.gun-rhd {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: clamp(10px, calc(1.6 * var(--u, 1vh)), 15px); font-weight: 900; color: #cfd9ea; margin-bottom: 3px;
}
.gun-rhd em { font-style: normal; color: #8fa0bb; font-weight: 700; }
.gun-rrow {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  border-bottom: 1px solid #2f3a4d; padding: 1px 4px;
  font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 16px);
}
.gun-rrow:last-child { border-bottom: 0; }
.gun-rrow b { color: var(--rc); font-weight: 900; }
.gun-rrow span { color: #e6eefc; font-weight: 800; }
.gun-rrow em { font-style: normal; color: #8fa0bb; font-size: .86em; }
/* 천장 — 「언젠가는 나온다」를 눈으로 보여 준다 */
.gun-pity {
  margin-top: 5px; padding: 3px 8px; border-radius: 8px;
  background: #0e131c; border: 2px solid #ffcc5c;
  font-size: clamp(10px, calc(1.6 * var(--u, 1vh)), 15px); font-weight: 800; color: #ffcc5c;
}
.gun-pity span { color: #e6eefc; }
.gun-pitybar {
  margin-top: 3px; height: 7px; border-radius: 999px; overflow: hidden;
  background: #253044; border: 1px solid #38455c;
}
.gun-pitybar i { display: block; height: 100%; background: linear-gradient(90deg, #ffcc5c, #ffe86a); }

.gun-myskins { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gun-myskin {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 3px solid #2f3a4d; border-radius: 10px; background: #151c28; color: #e6eefc;
  padding: 2px 10px; font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 800;
}
.gun-myskin.on { border-color: #ffe86a; }
.gun-none { color: #8fa0bb; font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 16px); }

/* =========================================================
   끝 화면
   ========================================================= */
.gun-end {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 13, .9); padding: calc(1.2 * var(--u, 1vh)) 1vw;
}
.gun-endbox {
  width: min(1060px, 98%); max-height: 96%; overflow-y: auto;
  background: #0f141d; border: 4px solid #e6eefc; border-radius: 14px;
  padding: clamp(6px, calc(1.4 * var(--u, 1vh)), 20px) clamp(12px, 1.8vw, 28px) clamp(6px, calc(1.2 * var(--u, 1vh)), 18px);
}
.gun-endhd {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  margin-bottom: clamp(5px, calc(1.1 * var(--u, 1vh)), 14px);
}
.gun-endL { display: flex; align-items: center; gap: 8px; justify-self: start; }
.gun-endbtns { justify-self: end; }
.gun-endtag {
  display: inline-flex; align-items: center; gap: 6px; color: #cfd9ea;
  border: 3px solid #2f3a4d; border-radius: 10px; padding: 2px 10px;
  font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 16px); font-weight: 800;
}
.gun-endttl {
  text-align: center; margin: 0;
  font-size: clamp(22px, calc(4.8 * var(--u, 1vh)), 52px); font-weight: 900; color: #fff;
  line-height: 1.05;
}
.gun-endttl::after {
  content: ''; display: block; width: 2.2em; height: 5px;
  margin: 2px auto 0; background: #fff; border-radius: 3px;
}
.gun-endbtns { display: flex; flex-direction: column; gap: 5px; }

.gun-endtb {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  border: 3px solid #e6eefc; color: #e6eefc;
}
.gun-endtb th, .gun-endtb td {
  border: 3px solid #e6eefc; text-align: center; padding: clamp(2px, calc(.6 * var(--u, 1vh)), 9px) 2px;
}
.gun-endtb th { font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 19px); font-weight: 900; background: #1a2231; }
.gun-endtb tbody td { font-size: clamp(18px, calc(3.9 * var(--u, 1vh)), 42px); font-weight: 900; color: #ffe86a; }
.gun-endtb tfoot td {
  font-size: clamp(10px, calc(1.7 * var(--u, 1vh)), 17px); font-weight: 800; color: #8fa0bb; background: #131a26;
}
.gun-endtb tfoot b { color: #b7dd58; font-size: 1.15em; }
.gun-endmn {
  margin-top: clamp(4px, calc(.9 * var(--u, 1vh)), 12px); text-align: center;
  font-size: clamp(11px, calc(1.9 * var(--u, 1vh)), 18px); font-weight: 800; color: #cfd9ea;
}
.gun-endmn b { color: #b7dd58; }
.gun-endmn span { color: #8fa0bb; }
.gun-endout { margin-top: clamp(4px, calc(.9 * var(--u, 1vh)), 12px); text-align: center; }
