/* ==========================================================================
   클레이 사격 (clay-shot)
   머리 표시: 왼쪽 점수·라운드·연속, 가운데 라운드의 10장(할당량 표시), 오른쪽 멈춤·진동·소리.
   아래 왼쪽 탄 두 발과 피버 게이지, 휴대폰은 아래 오른쪽 재장전 단추.
   효과 글자: 라운드 메뉴 카드, 라운드 결과 띠, 알림 띠(더블·원샷 더블·퍼펙트·피버·연속), 깨진 자리의 점수.
   게임 공통 모양(games.css)을 그대로 쓰고, 이 게임에만 있는 것만 더한다.
   ========================================================================== */

.cs-stage { background: #0B1018; }
.cs-stage.is-playing { cursor: none; }
.cs-stage.is-playing button { cursor: pointer; }

/* ---------- 머리 표시 ---------- */
.cs-hud { align-items: start; height: auto; }
.cs-hud .xg-score { text-shadow: 0 1px 14px rgba(0,0,0,.6); transition: color var(--d-3); }
.cs-stage.is-fever .cs-hud .xg-score { color: #FFE3A3; }
.cs-sub { gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.cs-round { color: var(--text-2); text-shadow: 0 1px 8px rgba(0,0,0,.6); white-space: nowrap; }
.cs-streak { white-space: nowrap; }

/* 이 라운드의 10장: 깬 것은 코랄, 놓친 것은 비운 원. 할당량 자리 뒤에 틈 */
.cs-tally {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-radius: var(--r-pill);
  background: rgba(7,10,15,.42); border: 1px solid rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  white-space: nowrap;
}
.cs-tally:empty { display: none; }
.cs-pips { display: flex; align-items: center; gap: 5px; }
.cs-pip {
  width: 12px; height: 12px; border-radius: 50%; display: block; position: relative;
  border: 1.5px solid rgba(234,240,247,.32); transition: background var(--d-2), border-color var(--d-2), transform var(--d-2) var(--ease-out);
}
.cs-pip.is-q { margin-right: 9px; }
.cs-pip.is-q::after { content: ""; position: absolute; right: -8.5px; top: -4px; bottom: -4px; width: 1.5px; border-radius: 2px; background: rgba(234,240,247,.4); }
.cs-pip.is-hit { border-color: #FF9A6E; background: radial-gradient(circle at 35% 35%, #FFC2A3, #F2794A 60%, #B4502E); transform: scale(1.08); }
.cs-pip.is-lost { border-color: rgba(234,240,247,.18); background: rgba(5,8,12,.5); }
.cs-pip.is-lost::before { content: ""; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1.5px; margin-left: -.75px; background: rgba(234,240,247,.35); transform: rotate(45deg); }
.cs-need { font-size: .8rem; color: var(--text-2); font-weight: 600; min-width: 5.6em; }
.cs-need.is-ok { color: var(--ether); }
.cs-tally.is-storm { gap: 10px; }
.cs-storm-t { font-size: .84rem; font-weight: 700; color: #FFE3A3; }
.cs-storm-n { font-family: var(--f-mono); font-weight: 500; font-size: .92rem; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 탄과 피버 게이지(아래 왼쪽) ---------- */
.cs-ammo {
  position: absolute; z-index: 5; left: 20px; bottom: calc(18px + var(--xg-bottom-gap, 0px));
  display: flex; align-items: center; gap: 16px; pointer-events: none;
  opacity: 0; transition: opacity var(--d-3);
}
.cs-stage.is-playing .cs-ammo, .cs-stage.is-paused .cs-ammo { opacity: 1; }
.cs-shells { display: flex; gap: 6px; }
.cs-shells i {
  display: block; width: 12px; height: 30px; border-radius: 3px 3px 2px 2px; position: relative;
  background: linear-gradient(180deg, #FFA17E 0%, #E86A43 55%, #A8442A 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  transition: opacity var(--d-2), transform var(--d-2) var(--ease-out);
}
.cs-shells i::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 8px; border-radius: 1px 1px 3px 3px; background: linear-gradient(180deg, #FFF0B8, #C9963E 60%, #8C6420); }
.cs-shells i.is-spent { opacity: .2; transform: translateY(3px); }
.cs-ammo.is-reloading .cs-shells i { animation: cs-load 550ms var(--ease-out); }
.cs-ammo.is-inf .cs-shells i { background: linear-gradient(180deg, #FFF1C8 0%, #F4C34E 55%, #B5862A 100%); box-shadow: 0 0 14px rgba(255,214,110,.55); }
.cs-ammo.is-empty { animation: xg-shake 260ms linear; }
@keyframes cs-load { 0% { opacity: .2; transform: translateY(10px); } 60% { opacity: .5; } 100% { opacity: 1; transform: none; } }

.cs-fever { display: grid; gap: 5px; }
.cs-fever span { font-size: .72rem; font-weight: 700; color: var(--text-3); letter-spacing: .02em; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.cs-fever b {
  --k: 0; position: relative; display: block; width: 92px; height: 5px; border-radius: 5px; overflow: hidden;
  background: rgba(234,240,247,.14);
}
.cs-fever b::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; transform-origin: left center; transform: scaleX(var(--k));
  background: linear-gradient(90deg, rgba(255,214,110,.5), #FFD873); transition: transform var(--d-2);
}
.cs-fever.is-on span { color: #FFE3A3; }
.cs-fever.is-on b { box-shadow: 0 0 12px rgba(255,214,110,.55); }
.cs-fever.is-on b::after { background: linear-gradient(90deg, #FFE9A6, #FFC34E); transition: none; }

/* ---------- 휴대폰 재장전 단추(아래 오른쪽) ---------- */
.cs-reload {
  position: absolute; z-index: 5; right: 16px; bottom: calc(16px + var(--xg-bottom-gap, 0px));
  display: none; align-items: center; justify-content: center; min-width: 88px; min-height: 48px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(10,14,20,.62); color: var(--text);
  font-size: .95rem; font-weight: 700; letter-spacing: -0.01em;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); touch-action: manipulation;
  transition: border-color var(--d-2), color var(--d-2), background var(--d-2);
}
.cs-stage.is-touch.is-playing .cs-reload { display: inline-flex; }
.cs-reload.is-need { border-color: rgba(255,138,102,.7); color: var(--xync-2); }
.cs-reload.is-empty { animation: xg-shake 260ms linear; }

/* 아이폰 햅틱: 무대를 덮는 투명한 label(손가락이 직접 누르면 스위치가 '틱') */
.cs-haptic { position: absolute; inset: 0; z-index: 1; display: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
.cs-stage.is-playing .cs-haptic:not(.is-off) { display: block; }
.cs-haptic-sw { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; visibility: hidden; }

/* ---------- 시작 화면의 조작: 손가락 기기에는 손가락 조작만 ---------- */
.xg-controls .cs-t { display: none; }
@media (pointer: coarse) {
  .xg-controls .cs-k { display: none; }
  .xg-controls .cs-t { display: inline-flex; }
}

/* ---------- 시작 안내 ---------- */
.cs-hint { bottom: calc(15% + var(--xg-bottom-gap, 0px)); display: inline-flex; align-items: center; gap: 8px; }
.cs-hint b { color: var(--text); font-weight: 750; }
.cs-hint kbd { height: 22px; min-width: 22px; }
.cs-hint-m { display: none; }
.cs-stage.is-touch .cs-hint-d { display: none; }
.cs-stage.is-touch .cs-hint-m { display: inline; }

/* ---------- 효과 글자 ---------- */
.cs-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }

/* 라운드 메뉴 카드(경기장의 메뉴판처럼 위쪽 가운데) */
.cs-menu {
  position: absolute; left: 50%; top: 23%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 4px; text-align: center; white-space: nowrap;
  animation: cs-menu 1700ms var(--ease-out) forwards;
}
.cs-menu::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 170%; height: 230%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(5,8,12,.62), rgba(5,8,12,.28) 60%, rgba(5,8,12,0));
}
.cs-menu .k { font-size: .9rem; font-weight: 650; color: var(--text-2); letter-spacing: .01em; }
.cs-menu b { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 820; letter-spacing: -0.035em; line-height: 1.15; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.cs-menu .s { font-size: .95rem; color: var(--text); opacity: .86; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
@keyframes cs-menu {
  0% { opacity: 0; transform: translate(-50%, -40%); }
  12% { opacity: 1; transform: translate(-50%, -50%); }
  82% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -58%); }
}

/* 라운드 결과 띠 */
.cs-band {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  display: flex; align-items: baseline; gap: 14px; padding: 12px 22px; border-radius: var(--r-pill); white-space: nowrap;
  background: rgba(7,10,15,.72); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: cs-band 1900ms var(--ease-out) forwards;
}
.cs-band b { font-family: var(--f-mono); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; }
.cs-band span { font-size: .95rem; color: var(--text-2); }
.cs-band .pt { font-family: var(--f-mono); color: var(--ether); font-size: 1rem; }
@keyframes cs-band {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(.96); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -56%); }
}

/* 알림 띠(더블·원샷 더블·퍼펙트·피버·연속) */
.cs-banner {
  position: absolute; left: 50%; top: 31%; transform: translate(-50%, -50%);
  text-align: center; white-space: nowrap; animation: cs-banner 1200ms var(--ease-out) forwards;
}
.cs-banner::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 150%; height: 220%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(5,8,12,.55), rgba(5,8,12,.25) 55%, rgba(5,8,12,0));
}
.cs-banner b {
  display: block; font-weight: 820; font-size: clamp(1.8rem, 4.6vw, 3rem); letter-spacing: -0.03em; line-height: 1.1; color: #fff;
  text-shadow: 0 0 22px rgba(99,242,210,.35), 0 3px 18px rgba(0,0,0,.6);
}
.cs-banner span { display: block; margin-top: 8px; font-weight: 600; font-size: clamp(.95rem, 2vw, 1.15rem); color: var(--text); text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.cs-banner.is-double b { color: #B9FBEC; }
.cs-banner.is-osd b {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 4.2rem); letter-spacing: -0.01em;
  background: linear-gradient(90deg, #8AF6DF, #fff 50%, #FFA98C); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(99,242,210,.35)); text-shadow: none;
}
.cs-banner.is-osd span { font-family: var(--f-sans); }
.cs-banner.is-perfect b, .cs-banner.is-fever b {
  background: linear-gradient(90deg, #FFE9A6, #fff 50%, #FFC34E); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,214,110,.45)); text-shadow: none;
}
.cs-banner.is-perfect b { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(2.8rem, 7vw, 4.6rem); letter-spacing: -0.01em; }
.cs-banner.is-mult b { color: var(--xync-2); text-shadow: 0 0 22px rgba(255,138,102,.4), 0 3px 18px rgba(0,0,0,.6); font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
.cs-banner.is-chain b { color: #B9FBEC; font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
.cs-banner.is-best b {
  background: linear-gradient(90deg, #8AF6DF, #fff 50%, #FFA98C); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(99,242,210,.35)); text-shadow: none;
}
@keyframes cs-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  24% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%); }
}

/* 깨진 자리의 점수 */
.cs-pop { position: absolute; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; animation: cs-pop 760ms var(--ease-out) forwards; }
.cs-pop b { display: block; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: #fff; text-shadow: 0 0 14px rgba(255,138,102,.5), 0 2px 10px rgba(0,0,0,.65); }
.cs-pop span { display: block; margin-top: 1px; font-family: var(--f-mono); font-size: .92rem; color: #FFD2BF; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.cs-pop.is-small b { font-size: .92rem; font-weight: 700; color: var(--text); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.cs-pop.is-small span { font-size: .84rem; color: var(--text); opacity: .9; }
.cs-pop.is-hot b { color: var(--xync-2); }
.cs-pop.is-gold b, .cs-pop.is-gold span { color: #FFE3A3; text-shadow: 0 0 14px rgba(255,214,110,.55), 0 2px 10px rgba(0,0,0,.6); }
@keyframes cs-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  70% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -105%); }
}

/* 결과 화면의 한 줄 */
.cs-why { font-size: .92rem; color: var(--text-2); }

/* 움직임 줄이기: 제자리에 잠깐 보였다가 사라진다(시간은 스크립트가 잰다) */
.cs-banner.is-static, .cs-pop.is-static, .cs-menu.is-static, .cs-band.is-static { animation: none !important; opacity: 1; }

@media (max-width: 860px) {
  .cs-sub { margin-top: 6px; }
  .cs-tally { top: 66px; padding: 6px 12px; gap: 10px; }
  .cs-pip { width: 11px; height: 11px; }
  .cs-pips { gap: 4px; }
  .cs-need { font-size: .76rem; min-width: 0; }
  .cs-ammo { left: 16px; bottom: calc(20px + var(--xg-bottom-gap, 0px)); gap: 12px; }
  .cs-fever b { width: 70px; }
  .cs-hint { font-size: .86rem; padding: 8px 14px; bottom: calc(20% + var(--xg-bottom-gap, 0px)); white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
  .cs-menu { top: 25%; }
  .cs-menu .s { font-size: .88rem; white-space: normal; max-width: 19em; }
  .cs-band { top: 42%; padding: 10px 18px; gap: 10px; }
  .cs-band b { font-size: 1.3rem; }
  .cs-band span { font-size: .88rem; }
  .cs-pop b { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-hud .xg-mult.is-bump { transform: none; }
  .cs-ammo.is-reloading .cs-shells i, .cs-ammo.is-empty, .cs-reload.is-empty { animation: none; }
}
