/* 에어하키 화면. 밝은 파스텔 + 네온 느낌. 계정 키트(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; }
.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; }

/* 고르기 창 (컴퓨터 난이도 등) */
.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: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255,255,255,.92); font-size: 15px; 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: 11px; 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; }
}
