/* ── 지구랩 모바일 공통 — 2026-11-12 (Claude) ───────────────────
   ★ astro.jigulab.co.kr 의 모바일 체계를 따른다
     머리글 = 로고 + 언어(+테마)  ·  메뉴 = 머리글 아래 가로 칩  ·  버튼 = 알약 44px
   ★ 색은 각 사이트 변수(--gold · --sub · --line …)를 그대로 쓴다 — 정체성은 사이트마다 유지 */

/* 머리글 안 언어 버튼 자리 (전 화면 공통) */
header .bar{gap:12px}
header .bar > nav{margin-left:auto}
header .bar > #i18n-switch,header .bar > .thm{margin-left:0}
header .bar > nav + #i18n-switch,header .bar > nav + .thm{margin-left:4px}
[id]{scroll-margin-top:72px}
/* 2026-11-12 — overflow-x:hidden 이 머리글 고정(sticky)을 깨고 있었다. clip 은 가로 넘침만 자르고 고정은 살린다 */
html,body{overflow-x:clip!important}
body>header:not(.hero){position:sticky!important;top:0;z-index:50}
/* 2026-11-12 — JIGU LAB 바로가기 (메뉴 맨 끝) */
nav a.to-lab{opacity:.72}
nav a.to-lab:hover{opacity:1}

/* 「전체 보기」 버튼 */
.m-more{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin-top:14px;
  border-radius:999px;border:1px solid currentColor;background:transparent;color:inherit;opacity:.85;
  font:600 15px/1 "Pretendard","Apple SD Gothic Neo","Noto Sans KR",-apple-system,sans-serif;letter-spacing:-.01em;cursor:pointer}
.m-more:active{opacity:1}
.m-hide{display:none!important}
[data-m-upcoming] .m-past{display:none!important}

@media (max-width:640px){
  header .bar{height:58px}
  header .bar > nav{display:none}
  /* 칩 줄 — 머리글 바로 아래, 함께 스크롤된다 */
  .m-chips{position:relative;z-index:5;padding:2px 0 10px;overflow:hidden}
  [id]{scroll-margin-top:124px}
  .m-chips nav{margin-left:0!important;justify-content:flex-start!important;display:flex!important;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;
    padding:0 var(--pad,20px);margin:0;flex-wrap:nowrap;height:auto}
  .m-chips nav::-webkit-scrollbar{display:none}
  .m-chips nav a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:40px;padding:0 15px;margin:0!important;
    border-radius:999px;border:1px solid var(--line,rgba(127,127,127,.3));white-space:nowrap;
    font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR",-apple-system,sans-serif!important;
    font-size:14px!important;font-weight:600;letter-spacing:-.01em!important;text-transform:none;color:inherit;opacity:.88}
  .m-chips nav a:first-child{border-color:var(--gold,#F2C230)}
  /* 테마 버튼이 머리글 안으로 들어왔을 때 */
  header .bar > .thm{position:static!important;right:auto!important;bottom:auto!important;top:auto!important;
    min-height:40px;margin-left:0}
}
/* 헤더 로고도 손가락 크기 */
@media (max-width:640px){ header .hlogo, header a.logo{display:inline-flex;align-items:center;min-height:44px} }
@media (max-width:640px){
  header .bar > #i18n-switch{margin-left:auto}
  header .bar > #i18n-switch + .thm, header .bar > .thm{margin-left:8px}
}
/* 번역 모드에서 곡 제목 옆 원제 풀이 — 모바일에서 12px 아래로 안 내려가게 */
@media (max-width:640px){ .i18n-tt{font-size:max(.86em,12px)!important;opacity:.8} }
/* 작은 글자 보정 — gen_small.py 자동 생성 */
@media (max-width:640px){
  .bar nav a{font-size:13px}
  .hero .en{font-size:12px}
  .lamps em{font-size:12px}
  .shd h2{font-size:12px}
  .shd .cnt{font-size:13px}
  .t .n{font-size:12px}
  .m .face span{font-size:12px}
  .m .role{font-size:12px}
  .m .sub{font-size:13px}
  .s .no{font-size:12px}
  .s .d{font-size:13px}
  .s .st{font-size:12px}
  .s h4 .nb{font-size:12px}
  .s .lnk a{font-size:13px}
  .lg dt{font-size:13px}
  .logfoot{font-size:13px}
  .g .lb{font-size:12px}
  .log::before{font-size:12px}
  .fl a{font-size:13px}
  .cp{font-size:13px}
}
/* ── 우주선밴드 · 모바일 ── */
@media (max-width:640px){
  .s .lnk{gap:8px}
  .s .lnk a{display:inline-flex;align-items:center;min-height:40px;padding:0 13px;font-size:13px;letter-spacing:.04em}
  .s h4 a{display:inline-block;padding:10px 0;margin:-10px 0}
  .fl a{display:inline-flex;align-items:center;min-height:44px}
}
