/* Leapinity Play 공통 위쪽 줄 (2026-11-17, 지우가 고른 그림 견본 02-play)
   허브 첫 화면(games.leapinity.com/)과 챌린지(/challenge/)이 똑같은 파일을 써요.
   원본: 미니게임허브/public/lpx-bar.css → 챌린지는 checking/public/challenge/css/lpx-bar.css 로 복사 (고치면 두 곳 같이)
   어두운 화면: 기기 설정(자동) 또는 <html data-theme="dark"> */
:root {
  --x-bg: rgba(255, 255, 255, .92); --x-bg2: #f5f6fb; --x-line: #e4e7f1; --x-text: #111827; --x-sub: #5b6475; --x-mute: #636b7e;
  --x-btn: #ffffff; --x-login: #111827; --x-login-ink: #ffffff; --x-menu-m: rgba(255, 255, 255, .97);
  --x-grad: linear-gradient(100deg, #7c5cff 0%, #38bdf8 55%, #2dd4a7 100%);
  --x-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --x-bg: rgba(11, 16, 48, .9); --x-bg2: #161d45; --x-line: #2b3468; --x-text: #eef1fb; --x-sub: #b3bad6; --x-mute: #a3abc9;
  --x-btn: #161d45; --x-login: #eef1fb; --x-login-ink: #0b1030; --x-menu-m: rgba(11, 16, 48, .97);
} }
:root[data-theme="dark"] {
  --x-bg: rgba(11, 16, 48, .9); --x-bg2: #161d45; --x-line: #2b3468; --x-text: #eef1fb; --x-sub: #b3bad6; --x-mute: #a3abc9;
  --x-btn: #161d45; --x-login: #eef1fb; --x-login-ink: #0b1030; --x-menu-m: rgba(11, 16, 48, .97);
}
html { scroll-padding-top: 76px; }
.lpx-bar { position: sticky; top: 0; z-index: 60; background: var(--x-bg); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--x-line); font-family: var(--x-font); color: var(--x-text); padding-top: env(safe-area-inset-top); }
.lpx-in { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 14px; box-sizing: border-box; position: relative; }
.lpx-brand { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; color: var(--x-text); text-decoration: none; flex: none; }
.lpx-brand svg { width: 36px; height: auto; flex: none; }
.lpx-brand b { font-weight: 800; }
.lpx-brand i { font-style: normal; font-weight: 800; background: var(--x-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lpx-menu { display: flex; gap: 2px; margin-left: 10px; min-width: 0; }
.lpx-menu a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--x-sub); text-decoration: none; white-space: nowrap; position: relative; }
.lpx-menu a:hover { background: var(--x-bg2); color: var(--x-text); }
.lpx-menu a.on { color: var(--x-text); font-weight: 700; }
.lpx-menu a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 3px; border-radius: 3px; background: var(--x-grad); }
.lpx-new { font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 99px; background: var(--x-grad); color: #fff; letter-spacing: .02em; line-height: 1.3; }
.lpx-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.lpx-search { display: flex; align-items: center; gap: 8px; width: 230px; height: 40px; margin: 0; border: 1px solid var(--x-line); border-radius: 999px; background: var(--x-bg2); padding: 0 8px 0 14px; box-sizing: border-box; color: var(--x-mute); }
.lpx-search:focus-within { border-color: #7c5cff; }
.lpx-search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lpx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--x-text); font: 500 14px/1 var(--x-font); outline: none; padding: 0; }
.lpx-search input::placeholder { color: var(--x-mute); opacity: 1; }
.lpx-search input::-webkit-search-cancel-button { display: none; }
.lpx-search kbd { font: 600 11px/1 var(--x-font); border: 1px solid var(--x-line); background: var(--x-btn); border-radius: 6px; padding: 3px 6px; color: var(--x-mute); }
.lpx-search:focus-within kbd { display: none; }
.lpx-ibtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--x-line); background: var(--x-btn); font-size: 17px; color: var(--x-text); flex: none; cursor: pointer; font-family: var(--x-font); }
.lpx-ibtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lpx-sbtn { display: none; }
.lpx-login { display: inline-flex; align-items: center; gap: 6px; height: 40px; max-width: 34vw; padding: 0 16px; border-radius: 12px; border: 0; background: var(--x-login); color: var(--x-login-ink); font: 700 14px/1 var(--x-font); white-space: nowrap; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.lpx-login b { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
/* 허브: me.js 가 그리는 로그인 단추 · theme.js 가 그리는 화면 색 단추를 이 줄 모양으로 */
.lpx-bar .me-bar { margin: 0; min-height: 40px; }
.lpx-bar .me-btn { min-height: 40px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--x-login); color: var(--x-login-ink); border: 0; font: 700 14px/1 var(--x-font); display: inline-flex; align-items: center; gap: 6px; }
.lpx-bar .me-chip { height: 40px; min-height: 40px; border-radius: 12px; background: var(--x-bg2); border-color: var(--x-line); color: var(--x-text); max-width: 30vw; }
.lpx-bar .theme-slot { min-width: 40px; min-height: 40px; }
.lpx-bar .theme-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-color: var(--x-line); background: var(--x-btn); color: var(--x-text); }
.lpx-bar .theme-txt { display: none; }
:focus-visible { scroll-margin-top: 80px; }
@media (max-width: 1180px) { .lpx-search { width: 170px; } .lpx-menu a { padding: 0 9px; font-size: 14.5px; } .lpx-menu a.on::after { left: 9px; right: 9px; } }
@media (max-width: 1020px) { .lpx-search { display: none; } .lpx-sbtn { display: inline-grid; }
  .lpx-bar.s-open .lpx-search { display: flex; position: absolute; left: 12px; right: 12px; top: calc(100% + 8px); width: auto; height: 46px; background: var(--x-btn); box-shadow: 0 10px 30px rgba(22, 28, 61, .14); z-index: 2; }
  .lpx-bar.s-open .lpx-search input { font-size: 16px; } }
@media (max-width: 820px) {
  html { scroll-padding-top: 116px; }
  .lpx-in { height: 56px; padding: 0 12px; gap: 8px; }
  .lpx-brand { font-size: 16.5px; gap: 7px; } .lpx-brand svg { width: 30px; }
  .lpx-login, .lpx-bar .me-btn { padding: 0 12px; height: 40px; font-size: 13.5px; }
  .lpx-menu { position: absolute; left: 0; right: 0; top: 56px; margin: 0; padding: 6px 12px 8px; gap: 6px; overflow-x: auto; background: var(--x-menu-m); border-bottom: 1px solid var(--x-line); scrollbar-width: none; }
  .lpx-menu::-webkit-scrollbar { display: none; }
  .lpx-menu a { height: 36px; padding: 0 13px; border-radius: 99px; background: var(--x-bg2); border: 1px solid var(--x-line); font-size: 14px; flex: none; }
  .lpx-menu a.on { background: var(--x-text); color: var(--x-login-ink); border-color: var(--x-text); }
  .lpx-menu a.on::after { display: none; }
  .lpx-bar { padding-bottom: 50px; }
  .lpx-bar.s-open .lpx-search { top: 100px; }
}
@media (max-width: 380px) { .lpx-brand i { display: none; } .lpx-in { gap: 6px; } }
