/* 샤봇 농구 슛 — 밤의 네온 코트 */
.stage.hp { --sp-a: #ff8a3d; --sp-a2: #d9502a; --sp-logo: #ffb43d; --sp-logo2: #ff5a4e; --sp-card1: #3a2266; --sp-card2: #170f36; touch-action: none; overscroll-behavior: none; background: #0d0f2c; }
.hp-cv { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
.hp-cv:active { cursor: grabbing; }

/* 위쪽 점수판: 모서리 둘 + 맨 위 시간 막대 (가운데는 공이 지나가니 비워 둔다) */
.hp-hud { position: absolute; inset: 0 0 auto 0; z-index: 2; pointer-events: none; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 10px 0; }
.hp-bar { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(255, 255, 255, 0.08); }
.hp-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #17b39b, #3ee0b5); box-shadow: 0 0 10px rgba(62, 224, 181, 0.7); border-radius: 0 3px 3px 0; }
.hp-low .hp-bar i { background: linear-gradient(90deg, #ff6b5a, #ff8a7d); box-shadow: 0 0 12px rgba(255, 107, 90, 0.8); animation: hp-blink 0.5s ease-in-out infinite alternate; }
@keyframes hp-blink { to { opacity: 0.55; } }
.hp-chip { display: flex; align-items: center; gap: 7px; padding: 4px 14px 4px 4px; border-radius: 99px;
  background: linear-gradient(180deg, rgba(44, 40, 104, 0.92), rgba(20, 16, 56, 0.92)); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 10px 10px -8px rgba(255, 255, 255, 0.18); }
.hp-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ff9a5a, #e2533a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.hp-r .hp-ic { background: linear-gradient(180deg, #3ee0b5, #10967b); }
.hp-ic svg { width: 26px; height: 26px; display: block; }
.hp-v { display: flex; flex-direction: column; line-height: 1; }
.hp-chip b { display: block; font-family: "Fredoka", var(--title); font-weight: 600; font-size: 26px; line-height: 1.05; color: #fff; }
.hp-chip em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #ffd23f; white-space: nowrap; }
.hp-r b { color: #3ee0b5; min-width: 1.4em; text-align: center; }
.hp-low .hp-r b { color: #ff8a7d; }
.hp-low .hp-r { animation: hp-pop 0.5s ease-in-out infinite alternate; }
.hp-pop { animation: hp-pop 0.34s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hp-pop { 40% { transform: scale(1.14); } }

/* 제목 · 결과(공통 틀 위에 농구 색) */
.hp .sp-how em { font-style: normal; }
.hp .sp-ov { background: radial-gradient(48% 60% at 50% 46%, rgba(12, 8, 40, 0.68), rgba(12, 8, 40, 0.38) 70%, rgba(6, 4, 20, 0.6)); }
.hp .sp-hero svg { width: min(280px, 64vw); }
@media (pointer: coarse) { .hp .sp-how span:has(.hp-keys) { display: none; } }
@media (max-width: 380px) {
  .hp-chip { padding-right: 10px; }
  .hp-ic { width: 30px; height: 30px; }
  .hp-chip b { font-size: 22px; }
}
@media (max-height: 440px) {
  .hp-ic { width: 28px; height: 28px; }
  .hp-chip b { font-size: 21px; }
}

/* ==SPORTKIT== 공통 스포츠 틀(양궁 · 다트 · 승부차기 · 볼링 · 농구 슛 같은 모양 — 고치면 다섯 곳을 같이). 게임 색 = --sp-a · --sp-a2 · --sp-logo · --sp-logo2 */
.sp-ov { background: radial-gradient(120% 85% at 50% 35%, rgba(8, 10, 36, 0.05), rgba(6, 8, 28, 0.72)); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 12px 14px; overflow: hidden; }
.sp-title { position: relative; width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: sp-in 0.55s cubic-bezier(.2, 1.4, .4, 1) both; touch-action: pan-y; }
.sp-tag { font-family: var(--title); font-size: 15px; line-height: 1.2; color: #fff; padding: 6px 16px 5px; border-radius: 99px; background: linear-gradient(180deg, var(--sp-a, #6470ff), var(--sp-a2, #3e48c8));
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45); max-width: 100%; }
.sp-logo { position: relative; margin: 2px 0 0; font-family: var(--logo, var(--title)); font-weight: 400; font-size: clamp(42px, 10.5vw, 88px); line-height: 1.02; letter-spacing: 0.01em; word-break: keep-all;
  color: #17123f; -webkit-text-stroke: 14px #17123f; paint-order: stroke fill; text-shadow: 0 8px 0 #17123f, 0 16px 28px rgba(0, 0, 0, 0.5); transform: rotate(-2.5deg); max-width: 100%; }
.sp-logo::after { content: attr(data-t); position: absolute; inset: 0; -webkit-text-stroke: 0; text-shadow: none; pointer-events: none;
  background: linear-gradient(180deg, #ffffff 0%, #fff6cf 34%, var(--sp-logo, #ffd23f) 58%, var(--sp-logo2, #ff8a3d) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-logo.long { font-size: clamp(34px, 8vw, 66px); }
/* 한국어가 아닌 판은 제목 글꼴이 본문 글꼴이라 굵게 */
html:not([lang='ko']) .sp-play, html:not([lang='ko']) .sp-seg button, html:not([lang='ko']) .sp-tag, html:not([lang='ko']) .sp-end-title, html:not([lang='ko']) .sp-best, html:not([lang='ko']) .sp-ribbon, html:not([lang='ko']) .sp-tut b, html:not([lang='ko']) .sp-score b { font-weight: 800; }
.sp-hero { line-height: 0; margin: -4px 0 -2px; }
.sp-hero svg { width: min(250px, 58vw); height: auto; animation: sp-bob 2.6s ease-in-out infinite; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35)); }
.sp-play { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: min(300px, 88%); max-width: 100%; padding: 15px 34px 14px; border: 0; border-radius: 22px; cursor: pointer;
  font-family: var(--title); font-size: 30px; line-height: 1.1; color: #4a2200; background: linear-gradient(180deg, #fff3a6 0%, #ffd23f 42%, #ffa91c 100%);
  box-shadow: 0 7px 0 #c46a00, 0 14px 26px rgba(0, 0, 0, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.8), inset 0 -4px 0 rgba(200, 100, 0, 0.22);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); animation: sp-breathe 1.9s ease-in-out infinite; transition: transform 0.08s, box-shadow 0.08s; -webkit-tap-highlight-color: transparent; }
.sp-play::after { content: ''; position: absolute; top: -30%; bottom: -30%; width: 34%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.8), transparent); transform: skewX(-20deg); animation: sp-shine 3s ease-in-out infinite; pointer-events: none; }
.sp-play i { display: block; width: 26px; height: 26px; flex: none; }
.sp-play i svg { display: block; width: 100%; height: 100%; }
.sp-play span { min-width: 0; }
.sp-play:hover { filter: brightness(1.06); }
.sp-play:active { transform: translateY(6px) scale(0.985); box-shadow: 0 1px 0 #c46a00, 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.6); animation: none; }
.sp-play.alt { color: #fff; background: linear-gradient(180deg, #6ff0cf 0%, #1fc4a0 45%, #10967b 100%); text-shadow: 0 2px 0 rgba(0, 70, 55, 0.5);
  box-shadow: 0 7px 0 #0a6b57, 0 14px 26px rgba(0, 0, 0, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -4px 0 rgba(0, 80, 60, 0.25); animation-delay: -0.9s; }
.sp-play.alt:active { box-shadow: 0 1px 0 #0a6b57, 0 4px 10px rgba(0, 0, 0, 0.35); }
.sp-play.small { font-size: 22px; padding: 11px 22px 10px; min-width: 0; }
.sp-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; width: 100%; }
.sp-btns .sp-play { min-width: 0; flex: 1 1 200px; }
.sp-seg { display: flex; gap: 4px; padding: 5px; border-radius: 18px; background: rgba(8, 10, 34, 0.62); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); max-width: 100%; }
.sp-seg button { flex: 1; min-width: 0; font-family: var(--title); font-size: 17px; line-height: 1.15; color: #cfd3ff; padding: 9px 14px 8px; border: 0; border-radius: 13px; background: transparent; cursor: pointer; transition: transform 0.1s; }
.sp-seg button:active { transform: scale(0.95); }
.sp-seg button.on { background: linear-gradient(180deg, var(--sp-a, #6470ff), var(--sp-a2, #3e48c8)); color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.sp-best { display: inline-flex; align-items: center; gap: 8px; padding: 5px 16px 5px 7px; border-radius: 99px; background: rgba(8, 10, 34, 0.66); color: #ffd23f; font-family: var(--title); font-size: 18px; line-height: 1.2;
  box-shadow: inset 0 0 0 2px rgba(255, 210, 63, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3); }
.sp-best[hidden] { display: none; }
.sp-best svg { width: 26px; height: 26px; flex: none; }
.sp-how { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.sp-how span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 99px; background: rgba(8, 10, 34, 0.55); color: #eef0ff; font-size: 13.5px; font-weight: 700; line-height: 1.25; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.sp-how svg { width: 22px; height: 22px; flex: none; }

/* 결과 화면 */
.sp-end { position: relative; width: min(420px, 100%); max-height: 100%; overflow: auto; padding: 16px 20px 18px; border-radius: 28px; text-align: center; color: #fff; touch-action: pan-y;
  background: linear-gradient(180deg, var(--sp-card1, #2d3274) 0%, var(--sp-card2, #171a42) 100%); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 10px 0 rgba(0, 0, 0, 0.35), 0 30px 60px rgba(0, 0, 0, 0.55); }
.sp-end.in { animation: sp-in 0.55s cubic-bezier(.2, 1.4, .4, 1) both; }
.sp-end::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 120px; border-radius: 28px 28px 0 0; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255, 220, 120, 0.28), transparent 70%); }
.sp-medal { position: relative; isolation: isolate; width: 84px; height: 94px; margin: 0 auto -2px; }
.sp-medal svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); }
.sp-end.in .sp-medal { animation: sp-medal 0.9s cubic-bezier(.2, 1.5, .4, 1) 0.15s both; }
.sp-medal.m3::after { content: ''; position: absolute; inset: -18px; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255, 220, 90, 0.5), transparent 12%, rgba(255, 220, 90, 0.5) 25%, transparent 37%, rgba(255, 220, 90, 0.5) 50%, transparent 62%, rgba(255, 220, 90, 0.5) 75%, transparent 87%, rgba(255, 220, 90, 0.5));
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: sp-spin 6s linear infinite; }
.sp-end-title { margin: 0; font-family: var(--title); font-weight: 400; font-size: 30px; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.sp-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 4px 0 0; }
.sp-stars i { display: block; width: 52px; height: 52px; }
.sp-stars i:nth-child(2) { width: 66px; height: 66px; margin-bottom: 8px; }
.sp-stars svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sp-stars .b { fill: rgba(0, 0, 0, 0.35); }
.sp-stars .f { fill: #3d4280; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; }
.sp-stars .h { stroke: transparent; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.sp-stars i.on { animation: sp-star 0.55s cubic-bezier(.2, 1.8, .4, 1) both; }
.sp-stars i.on .f { fill: #ffd23f; stroke: #b8700c; stroke-width: 1.2; }
.sp-stars i.on .b { fill: #b8700c; }
.sp-stars i.on .h { stroke: #fff; }
.sp-stars i.off { animation: sp-off 0.3s ease-out both; }
.sp-score { margin: 0; line-height: 1; }
.sp-score b { font-family: var(--title); font-weight: 400; font-size: 60px; line-height: 1; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 220, 120, 0.35); }
.sp-score small { font-family: var(--title); font-size: 20px; color: #cfd3ff; margin-left: 4px; }
.sp-score small:empty { display: none; }
.sp-ribbon { display: inline-block; margin: 6px auto 2px; padding: 6px 28px 5px; font-family: var(--title); font-size: 19px; color: #4a2200; background: linear-gradient(180deg, #fff3a6, #ffb21f);
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); animation: sp-rib 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.sp-ribbon[hidden] { display: none; }
.sp-end .end-msg { margin: 6px 0 8px; font-size: 14.5px; line-height: 1.4; color: #dfe2ff; }
.sp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 6px; }
.sp-stats div { background: rgba(0, 0, 0, 0.26); border-radius: 14px; padding: 7px 4px 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); min-width: 0; }
.sp-stats b { display: block; font-family: var(--title); font-weight: 400; font-size: 22px; line-height: 1.15; color: #ffd23f; }
.sp-stats span { display: block; font-size: 11.5px; line-height: 1.25; color: #b9bee8; }
.sp-next { margin: 4px 0 10px; font-size: 14px; color: #cfd3ff; font-weight: 700; }
.sp-next[hidden] { display: none; }
.sp-end .sp-play { width: 100%; min-width: 0; font-size: 26px; padding: 13px 20px 12px; }
.sp-end .sp-play + .sp-play { margin-top: 12px; }
.sp-link { display: inline-block; margin-top: 12px; font-size: 13.5px; color: #b9bee8; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; padding: 2px 6px; }
.sp-link:hover { color: #fff; }

/* 처음 안내 손가락 */
.sp-tut { position: absolute; z-index: 8; pointer-events: none; width: 0; height: 0; animation: sp-fade 0.3s ease-out both; }
.sp-tut.out { animation: sp-fadeout 0.3s ease-in both; }
.sp-tut .sp-hand { position: absolute; left: -19px; top: -4px; width: 54px; transform-origin: 19px 4px; animation: sp-drag 2.2s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.sp-tut .sp-hand svg { display: block; width: 100%; height: auto; }
.sp-tut .sp-dot { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.7); animation: sp-tap 2.2s ease-out infinite; }
.sp-tut .sp-trail { position: absolute; left: 0; top: 0; overflow: visible; }
.sp-tut .sp-trail path { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; animation: sp-dash 0.6s linear infinite; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)); }
.sp-tut b { position: absolute; transform: translate(-50%, 0); white-space: nowrap; font-family: var(--title); font-weight: 400; font-size: 20px; line-height: 1.2; color: #fff; padding: 7px 15px 6px; border-radius: 14px;
  background: rgba(12, 14, 44, 0.86); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.18); animation: sp-bob 1.6s ease-in-out infinite; }
.sp-tut.tap .sp-hand { animation-name: sp-tapHand; }

@keyframes sp-in { 0% { opacity: 0; transform: translateY(24px) scale(0.92); } 100% { opacity: 1; transform: none; } }
@keyframes sp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.sp-tut b { animation-name: sp-bobc; }
@keyframes sp-bobc { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }
@keyframes sp-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes sp-shine { 0%, 55% { left: -50%; } 85%, 100% { left: 130%; } }
@keyframes sp-medal { 0% { opacity: 0; transform: translateY(-40px) scale(0.4) rotate(-30deg); } 100% { opacity: 1; transform: none; } }
@keyframes sp-spin { to { transform: rotate(360deg); } }
@keyframes sp-star { 0% { transform: scale(2.4) rotate(-40deg); opacity: 0; } 60% { transform: scale(0.88) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes sp-off { 0% { transform: scale(1.2); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
@keyframes sp-rib { 0% { transform: scale(0.3) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-fadeout { to { opacity: 0; } }
@keyframes sp-dash { to { stroke-dashoffset: -14; } }
@keyframes sp-drag {
  0% { transform: translate(0, 0) scale(1.12); opacity: 0; } 10% { transform: translate(0, 0) scale(1.12); opacity: 1; } 20% { transform: translate(0, 0) scale(0.92); }
  62% { transform: translate(var(--dx), var(--dy)) scale(0.92); opacity: 1; } 72% { transform: translate(var(--dx), var(--dy)) scale(1.12); opacity: 1; } 88%, 100% { transform: translate(var(--dx), var(--dy)) scale(1.12); opacity: 0; } }
@keyframes sp-tapHand { 0%, 100% { transform: scale(1.1); } 30% { transform: scale(0.9); } 50% { transform: scale(1.1); } }
@keyframes sp-tap { 0%, 14% { transform: scale(0.3); opacity: 0; } 22% { transform: scale(0.6); opacity: 1; } 50% { transform: scale(1.6); opacity: 0; } 100% { opacity: 0; } }

@media (max-height: 640px) {
  .sp-title { gap: 7px; }
  .sp-hero svg { width: min(170px, 46vw); }
  .sp-logo { font-size: clamp(36px, 9vw, 64px); -webkit-text-stroke-width: 11px; }
  .sp-play { font-size: 25px; padding: 11px 26px 10px; }
  .sp-medal { width: 64px; height: 72px; }
  .sp-score b { font-size: 46px; }
  .sp-stars i { width: 40px; height: 40px; } .sp-stars i:nth-child(2) { width: 50px; height: 50px; }
}
@media (max-height: 460px) {
  .sp-hero { display: none; }
  .sp-how { display: none; }
  .sp-medal { display: none; }
  .sp-end { padding: 10px 16px 12px; }
  .sp-end .end-msg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sp-play, .sp-play::after, .sp-hero svg, .sp-medal.m3::after { animation: none; } }
/* ==/SPORTKIT== */
