/* 에어하키 화면. 밝은 파스텔 + 네온 느낌. 계정 키트(kit.css)와 같은 색을 씀 */
:root { --pink: #ff5fa2; --blue: #3d9bff; --violet: #8b7cf6; --ink: #2f3550; --muted: #7a809c; --line: #ece8f4; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: var(--ink); word-break: keep-all;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, #ffd6e8 0%, transparent 70%),
    radial-gradient(ellipse 55% 40% at 100% 20%, #d6ebff 0%, transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, #e6dcff 0%, transparent 70%),
    #fff9fc;
  background-attachment: fixed;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- 첫 화면 ---------- */
#home { max-width: 480px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); min-height: 100%; display: flex; flex-direction: column; gap: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* 손님이면 계정 칩에 💾 가입 단추가 더 붙어서 좁은 휴대폰에서 옆으로 넘쳤음 → 모자라면 칩이 다음 줄(오른쪽)로 (2026-10-29) */
.top { flex-wrap: wrap; row-gap: 6px; }
#accountSlot { margin-left: auto; max-width: 100%; }
@media (max-width: 420px) { .logo svg { width: 34px; height: 34px; } .logo h1 { font-size: 21px; } }
.logo { display: flex; align-items: center; gap: 6px; }
.logo h1 { margin: 0; font-size: 23px; white-space: nowrap; font-weight: 900; letter-spacing: -1px; background: linear-gradient(90deg, var(--pink), var(--violet) 60%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; display: flex; align-items: stretch; gap: 8px; height: min(32vh, 280px); min-height: 190px; border-radius: 26px; overflow: hidden; padding: 6px 6px 6px 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.85), rgba(243,240,255,.8)); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(120, 100, 190, .15); }
.hero-text { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hero-title { margin: 0 0 10px; font-size: 22px; font-weight: 900; line-height: 1.25; letter-spacing: -0.5px; }
.hero-title b { font-size: 34px; background: linear-gradient(90deg, var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #555b78; }
.hero canvas { height: 100%; aspect-ratio: 0.6; flex: none; }
.menu { display: grid; gap: 10px; }
.card { display: block; width: 100%; text-align: left; border-radius: 22px; padding: 14px; background: rgba(255,255,255,.92); border: 1.5px solid var(--line); box-shadow: 0 8px 24px rgba(120, 100, 190, .1); }
.card-head, .tile { display: flex; align-items: center; gap: 12px; }
.card .ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; font-size: 25px; border-radius: 15px; background: #f3f0ff; }
.card.friend .ico { background: #ffe3ef; }
.card b { display: block; font-size: 17px; font-weight: 900; }
.card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; font-weight: 600; }
.tile { transition: transform .1s; }
.tile:active, .btn:active { transform: scale(.97); }
.tile > div { flex: 1; }
.tile .go { font-size: 28px; font-weight: 900; color: #c9c2ef; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.row2.small { margin-top: 0; }
.btn { border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 13px 10px; font-weight: 900; font-size: 15.5px; color: var(--violet); transition: transform .1s; }
.btn.primary { border: 0; color: #fff; background: linear-gradient(135deg, #ff8fb8, var(--violet)); box-shadow: 0 6px 16px rgba(139, 124, 246, .3); }
.btn.gold { border: 0; color: #6b4400; background: linear-gradient(135deg, #ffe08a, #ffc24b); }
.foot { text-align: center; margin: 0; }
.link { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px; }
#soundBtn { min-height: 44px; padding: 6px 16px; } #helpBtn { min-height: 44px; } /* 손가락으로 누르기 쉽게 (2026-11-01) */

/* 고르기 창 (컴퓨터 난이도 등) */
.pick { display: grid; gap: 8px; margin: 10px 0; }
.pick button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; text-align: left; color: var(--ink); }
.pick button.on { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,124,246,.18); background: #faf8ff; }
.pick .lv { font-size: 24px; }
.pick b { display: block; font-size: 16px; }
.pick small { color: var(--muted); font-size: 12.5px; }
.pick .gold { margin-left: auto; color: #c98200; font-weight: 900; font-size: 13px; white-space: nowrap; }
.set-label { font-size: 13px; font-weight: 800; color: var(--muted); margin: 12px 0 6px; }
.howto { display: grid; gap: 10px; margin: 8px 0; padding: 0; list-style: none; }
.howto li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; font-size: 14.5px; line-height: 1.55; }
.howto .n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: #f3f0ff; font-size: 18px; }
.howto b { color: var(--pink); }
.result-big { text-align: center; font-size: 46px; margin: 0; }
.result-score { font-size: 54px; font-weight: 900; text-align: center; letter-spacing: 2px; margin: 4px 0; }
.result-score .me { color: var(--pink); } .result-score .op { color: var(--blue); }
.result-score small { display: block; font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 700; }
.result-gold { text-align: center; font-weight: 900; color: #c98200; font-size: 18px; margin: 4px 0; }

/* ---------- 게임 화면 ---------- */
#play { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#table { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.play-btns { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.pbtn { width: calc(36px * var(--kit-btn-scale, 1)); height: calc(36px * var(--kit-btn-scale, 1)); border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255,255,255,.92); font-size: calc(15px * var(--kit-btn-scale, 1)); font-weight: 900; color: var(--muted); box-shadow: 0 4px 12px rgba(60,50,110,.12); padding: 0; }
.net { position: absolute; right: 8px; bottom: 4px; font-size: calc(11px * var(--kit-btn-scale, 1)); color: var(--muted); background: rgba(255,255,255,.8); padding: 2px 8px; border-radius: 99px; pointer-events: none; }
body.dark-play .pbtn { background: rgba(30,18,70,.85); border-color: rgba(255,255,255,.15); color: #fff; }
body.dark-play .net { background: rgba(30,18,70,.8); color: #c9c2ff; }
body.playing { background: radial-gradient(ellipse 80% 50% at 50% 0%, #ffe3ef 0%, transparent 70%), radial-gradient(ellipse 80% 50% at 50% 100%, #dcecff 0%, transparent 70%), #fbf8ff; }
body.playing.dark-play { background: radial-gradient(ellipse 80% 50% at 50% 50%, #2a1660 0%, transparent 80%), #0f0a26; }
@media (min-width: 700px) {
  #home { padding-top: 24px; }
  .hero { height: 300px; }
}
/* 휴대폰 가로: 첫 화면을 한눈에 (미리보기를 낮게, 메뉴는 두 줄로) */
@media (orientation: landscape) and (max-height: 520px) {
  #home { max-width: 860px; padding-top: max(8px, env(safe-area-inset-top)); gap: 8px; }
  .hero { height: 140px; min-height: 0; }
  .hero-title { font-size: 17px; margin-bottom: 6px; } .hero-title b { font-size: 24px; }
  .hero ul { gap: 3px; font-size: 12px; }
  .menu { grid-template-columns: 1fr 1fr; align-items: start; }
  .menu .card.friend { grid-row: span 2; }
  .card { padding: 10px 12px; }
}

/* 판 중 버튼은 손가락으로 누르기 쉽게 44px 이상 (2026-11-01) */
@media (pointer: coarse) { .pbtn { width: max(44px, calc(36px * var(--kit-btn-scale, 1))); height: max(44px, calc(36px * var(--kit-btn-scale, 1))); } }

/* ⚡ 빠른 대전 단추 (2026-11-03) */
.qm-go { display: block; width: 100%; margin-top: 12px; min-height: 48px; font-size: 16.5px; }
.qm-note { margin: 6px 2px 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.btn { min-height: 44px; }

/* ---------- 🎬 첫 화면 배경 (kit/title.css 위에 번개 에어하키 색·점무늬·하키 판·떠다니는 말렛과 퍽, 2026-11-10) ---------- */
#title { --lt-a: #ff5fa2; --lt-b: #3d9bff; --lt-ink: #2f3550; --lt-muted: #6a7090; --lt-brand: #7b6cff; --lt-sh: #4b62d6; --lt-glow: rgba(255, 95, 162, .35); --lt-bgc: #eaf1ff;
  background-image: radial-gradient(#cdd8f3 1.6px, transparent 2px); background-size: 22px 22px; }
#title .lt-o { filter: drop-shadow(0 6px 10px rgba(50, 40, 120, .22)); }
#title .ah-rink { position: absolute; inset: 14px; border: 6px solid #ff9cc6; border-radius: 40px; box-shadow: inset 0 0 0 4px #fff; }
#title .ah-rink::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; background: linear-gradient(90deg, rgba(61, 155, 255, .45) 0 8%, transparent 14% 86%, rgba(61, 155, 255, .45) 92%); }
#title .ah-rink::after { content: ""; position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border: 4px solid rgba(61, 155, 255, .45); border-radius: 50%; }
#title .ah-gl { position: absolute; left: 50%; width: 150px; height: 14px; margin-left: -75px; background: #3d2f7a; border-radius: 8px; }
#title .ah-gl.t { top: 10px; } #title .ah-gl.b { bottom: 10px; }
#title .ah-e { font-size: 44px; }
#title .a1 { top: 10%; left: 8%; }
#title .a2 { top: 18%; right: 12%; }
#title .a3 { top: 18%; right: 26%; }
#title .a4 { top: 34%; left: 8%; font-size: 42px; --r: -10deg; }
#title .a5 { top: 6%; left: 30%; font-size: 34px; --r: 10deg; }
#title .a6 { bottom: 8%; right: 10%; }
#title .a7 { bottom: 17%; left: 10%; }
#title .a8 { bottom: 17%; right: 10%; font-size: 40px; --r: 14deg; }
#title .a9 { top: 31%; right: 8%; }
#title .a10 { bottom: 8%; left: 12%; font-size: 40px; }
@media (orientation: landscape) and (max-height: 500px) {
  #title .ah-rink::after { width: 160px; height: 160px; margin: -80px 0 0 -80px; }
  #title .ah-gl { width: 110px; margin-left: -55px; }
  #title .ah-e, #title .a4, #title .a8, #title .a10 { font-size: 30px; } #title .a5 { font-size: 24px; top: 8%; left: 26%; }
  #title .a1 svg { width: 50px; height: 50px; } #title .a6 svg { width: 48px; height: 48px; }
  #title .a2 { top: 26%; right: 6%; } #title .a3 { top: 26%; right: 14%; } #title .a9 { top: 50%; right: 5%; }
  #title .a4 { top: 46%; left: 5%; } #title .a7 { bottom: 22%; left: 13%; } #title .a8 { bottom: 26%; right: 16%; }
}
