/* ==========================================================================
   게임장 · 고블린 크래쉬 (ac-, templates/arcade/goblin-crash.html)
   틀(머리 · 1P 지갑 · GAME SELECT · 패널 .grid2 · .glass · .rules)은 게임장과 같은 arcade.css 를 같이 불러 씀.
   여기에는 고블린 화면에만 있는 것(지갑 숫자 · 게임 화면 · 랭킹/내 기록 · 모험가 기술)만 둠
   ========================================================================== */
.ac { padding-bottom:var(--sp-16); }

/* 1P 지갑: CREDIT = 보유 포인트 (게임장 #bal 과 같은 숫자 모양), 오른쪽 1판 · 오늘 플레이 */
.arcade .ac-wallet .balance b { font-family: var(--ar-font); font-size: 52px; font-weight: var(--fw-regular); line-height: .95; letter-spacing: .03em; color: var(--ar-neon-gold); text-shadow: 0 0 22px rgba(255,213,74,.35); font-variant-numeric: tabular-nums; }
.arcade .ac-wallet .balance b small { margin-left:var(--sp-1); font-size: var(--fs-3xl); font-weight: var(--fw-regular); color: var(--muted); text-shadow: none; }
.arcade .ac-wallet .net small { margin-left:2px; font-family: var(--ar-font); font-size: var(--fs-md); font-weight: var(--fw-regular); color: var(--muted); }
.arcade .ac-picon { display: inline-flex; flex-shrink: 0; }
.arcade .ac-picon img:not([hidden]) + .uicon { display: none; } /* 장착한 아이콘이 있으면 첫 글자 동그라미는 숨김 */
/* 포인트가 빠질 때 (goblin-crash.js spendFx): 게임 화면 위쪽 가운데에 '-10P' 가 떠올라 사라지고, 보유 포인트 숫자가 잠깐 붉게 */
.ac-spend { position: absolute; left: 50%; top: 18%; z-index: 2; padding:var(--sp-2) var(--sp-4); border-radius: 999px; background: rgba(var(--scrim-rgb), .72); font-style: normal; font-size: var(--fs-3xl); font-weight: var(--fw-black); line-height: var(--lh-none); color: var(--ui-error); text-shadow: 0 2px 0 rgba(0,0,0,.4); pointer-events: none; animation: acSpend 1.3s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes acSpend { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.8); } 16% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 28% { transform: translate(-50%, 0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px); } }
.arcade .ac-wallet .pt.is-spent b { animation: acSpendNum .7s ease-out; }
@keyframes acSpendNum { 0%, 30% { color: var(--ui-error); } 100% { color: var(--ar-neon-gold); } }
@media (prefers-reduced-motion: reduce) { .ac-spend, .arcade .ac-wallet .pt.is-spent b { animation: none; } }

/* 패널: 왼쪽 = 제목·설명 + 게임 화면 (다른 게임의 .glass.box 와 같은 짜임), 오른쪽 = 랭킹·내 기록 + 하는 법 */
.arcade .ac-play { display: flex; flex-direction: column; gap:var(--sp-4); }
.arcade .ac-desc { font-size: var(--fs-md); }
.ac-stage { position: relative; aspect-ratio: 16 / 9; min-height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: var(--gc-stage); }
.ac-stage iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }

/* 랭킹 · 내 기록 탭(.ac-side · .ac-tabs · .ac-stats · .ac-chart)은 다른 게임도 같이 써서 arcade.css 로 옮김 */

/* 모험가 기술 카드 (4칸 → 2칸 → 1칸). --k = 모험가 색. 제목은 GAME SELECT 와 같은 .ar-sec-title */
.ac-skills { margin-top:var(--sp-10); }
.ac-skills__sub { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--muted); }
.ac-skills__grid { display: flex; gap:var(--sp-3); margin:0; padding:0 0 var(--sp-2); list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; } /* 다 펼치면 세로로 길어서(폰 1칸씩) 한 줄로, 넘기기는 ‹ › 버튼 (arcade-common.js [data-hscroll]) */
.ac-skills__grid::-webkit-scrollbar { display: none; }
.ac-skills__grid > .ac-skill { flex: 0 0 calc((100% - var(--sp-3) * 3) / 4); min-width: 0; scroll-snap-align: start; } /* 8장 = 한 화면에 딱 4장씩 (태블릿 2장 · 폰 1장), ‹ › 는 한 화면씩 */
@media (max-width: 1024px) { .ac-skills__grid > .ac-skill { flex-basis: calc((100% - var(--sp-3)) / 2); } }
@media (max-width: 600px) { .ac-skills__grid > .ac-skill { flex-basis: 100%; } }
.ac-skill { display: flex; flex-direction: column; gap:var(--sp-3); padding:var(--sp-4); border: 1px solid var(--line); border-top: 3px solid var(--k, var(--line-strong)); border-radius: var(--radius); background: var(--surface-solid); }
.ac-skill__head { display: flex; align-items: center; gap:var(--sp-3); }
.ac-skill__face { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center 15%; background: var(--surface-2); border: 2px solid var(--k); }
.ac-skill__face.px { object-fit: contain; image-rendering: pixelated; }
.ac-skill__head > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-skill__head b { font-size: var(--fs-lg); font-weight: var(--fw-heavy); line-height: var(--lh-tight); color: var(--k); }
.ac-skill__head small { font-size: var(--fs-xs); color: var(--muted); }
.ac-skill__head em { align-self: flex-start; font-style: normal; font-size: var(--fs-micro); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); color: var(--muted); white-space: nowrap; }
.ac-skill__meters { display: grid; gap:var(--sp-2); }
.ac-meter { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap:var(--sp-2); font-size: var(--fs-xs); color: var(--text-sub); }
.ac-meter__bar { display: grid; grid-template-columns: repeat(5, 1fr); gap:var(--sp-1); }
.ac-meter__bar i { height: 6px; border-radius: 2px; background: var(--surface-2); }
.ac-meter__bar i.on { background: var(--k); }
.ac-skill p { margin:0; font-size: var(--fs-sm); line-height: var(--lh-base); color: var(--text-sub); }
.ac-skill p strong { color: var(--text-strong); font-weight: var(--fw-bold); }
.ac-skill--note { justify-content: center; border-top-color: var(--line-strong); background: transparent; border-style: dashed; }
.ac-skill--note b { color: var(--text-strong); }

@media (max-width: 768px) {
  .ac-stage { aspect-ratio: auto; height: min(78svh, 640px); min-height: 0; }
}
/* 폰: 모험가 기술은 [SKILLS 모험가 기술 ›] 단추 한 줄 → 아래에서 올라오는 칸 (arcade-common.js skillsSheet, 랭킹 칸 .ac-col.is-sheet 와 같은 모양) */
.ac-skills-open { display: none; }
@media (max-width: 768px) {
  .ac-skills-open { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 56px; margin-top: var(--sp-6); padding: 0 var(--sp-4); font: inherit; text-align: left; color: var(--text-strong); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
  .ac-skills-open:hover { border-color: var(--accent-line); }
  .ac-skills-open__en { font-family: var(--ar-font); font-size: var(--fs-2xl); letter-spacing: .14em; color: var(--ar-neon-cyan); }
  .ac-skills-open b { font-size: var(--fs-lg); }
  .ac-skills-open small { font-size: var(--fs-sm); color: var(--muted); }
  .ac-skills-open__chev { margin-left: auto; font-size: var(--fs-2xl); color: var(--text-sub); }
  .arcade .ac-skills.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet); max-height: min(82svh, 720px); margin: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px)); background: var(--surface-solid); border-top: 1px solid var(--line-strong); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -20px 40px -10px rgba(var(--scrim-rgb), .8);
    transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s .28s; }
  .arcade .ac-skills.is-sheet.is-open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  .ac-skills.is-sheet .ar-sec-title { display: none; }   /* 제목은 칸 머리(.ac-sheet-head)에 */
  .ac-skills.is-sheet .ac-skills__grid { flex-direction: column; overflow: visible; scroll-snap-type: none; }   /* 칸 안에서는 위아래로 쭉 */
  .ac-skills.is-sheet .ac-skills__grid > .ac-skill { flex: none; }
  .ac-skills.is-sheet .hs-btn { display: none; }
  .ac-skills.is-sheet .hs-wrap { padding: 0; }   /* ‹ › 자리 여백도 뺌 (칸 폭 가득) */
  .arcade .ac-skills.is-sheet { scrollbar-width: none; }   /* 스크롤 막대가 오른쪽 폭을 먹어 카드가 왼쪽으로 쏠렸음: 막대는 숨기고(밀어서 스크롤은 그대로) 좌우 여백을 같게 */
  .arcade .ac-skills.is-sheet::-webkit-scrollbar { display: none; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) { .arcade .ac-skills.is-sheet, .arcade .ac-skills.is-sheet.is-open { transition: none; } }
@media (max-width: 480px) {
  .arcade .ac-wallet .balance b { font-size: 44px; } /* 게임장 지갑(arcade.css #bal)과 같은 크기 */
}
