/* 모바일 상단 헤더 — rabbitstock.com 모바일 헤더 규격 (2026-11-18, 375px 실측)
   높이 70 · 좌우 16 · 아래 테두리 1px · 로고 영역 170×28(rabbitstock은 150, 새 로고가 가로로 길어 넓힘) · 오른쪽 묶음 간격 6
   글자 버튼 높이 32(13px/500, 모서리 14, 안쪽 6×12) · 아이콘 버튼 28×28(아이콘 20)
   메인 앱은 header.js 가 <html>에 bb-header-compact 를 붙인 뒤에만 적용됩니다(스크립트 실패 시 기존 헤더 유지). */
@media (max-width:767px){
  html.bb-header-compact #header:not(#_){height:70px!important;min-height:0!important;padding:0!important;background:#fff!important;border-bottom:1px solid var(--neutral-100)!important;overflow:hidden}
  html.bb-header-compact #header:not(#_) > .h6-header{height:64px!important;min-height:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:16px!important;box-sizing:border-box!important;border:0!important;box-shadow:none!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
  html.bb-header-compact #header:not(#_) .h6-logo{flex:0 1 170px!important;min-width:0!important;width:170px!important;height:28px!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;align-items:center!important}
  html.bb-header-compact #header:not(#_) .h6-logo .bb-brand-approved{width:100%!important;max-width:170px!important;height:28px!important;margin:0!important}
  html.bb-header-compact #header:not(#_) .h6-header-tools{flex:none!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;display:flex!important;align-items:center!important;gap:6px!important;position:static!important}
  /* 아이콘 버튼(언어): 28×28, 아이콘 20 */
  html.bb-header-compact #header:not(#_) .h6-header-tools > .h6-tool{position:relative;width:28px!important;height:28px!important;min-width:0!important;min-height:0!important;padding:4px!important;border-radius:14px!important;font-size:0!important;line-height:0!important;gap:0!important;overflow:visible;justify-content:center!important}
  html.bb-header-compact #header:not(#_) .h6-header-tools > .h6-tool > .bb-art{width:20px!important;height:20px!important;margin:0!important;flex:none!important}
  /* 글자 버튼(내 여행·로그인): 높이 32 */
  html.bb-header-compact #header:not(#_) .h6-header-tools > .member-entry{position:relative;height:32px!important;min-height:0!important;min-width:0!important;padding:6px 12px!important;border-radius:14px!important;border:0!important;background:var(--neutral-900)!important;color:#fff!important;font-size:13px!important;font-weight:500!important;line-height:20px!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important}
  /* 보이는 크기는 32·28이지만 누름 영역은 44px 이상으로 */
  html.bb-header-compact #header:not(#_) .h6-header-tools > .h6-tool::after{content:"";position:absolute;inset:-8px -1px -8px -8px}
  html.bb-header-compact #header:not(#_) .h6-header-tools > .member-entry::after{content:"";position:absolute;inset:-6px -4px -6px -1px}
  /* 헤더에서 내린 모드 전환(부산 여행 / 여행 후): 헤더 바로 아래, 화면과 함께 스크롤 */
  .bb-mode-row{display:flex;padding:8px 16px 0;background:#fff}
  /* 모드 전환(부산 여행 / 여행 후): rabbitstock 모바일의 섹션 탭 규격 — 높이 40 · 안쪽 8×12 · 16px 굵게 · 모서리 12 · 간격 4, 선택된 쪽만 옅은 파란 배경 + 진한 파란 글자 */
  .bb-mode-row > .h6-mode:not(#_){margin:0!important;position:static!important;height:auto!important;padding:0!important;gap:4px!important;border:0!important;background:none!important;box-shadow:none!important}
  html.bb-header-compact .bb-mode-row > .h6-mode:not(#_) > button{position:relative;height:40px!important;min-height:0!important;min-width:0!important;padding:8px 12px!important;border:0!important;border-radius:12px!important;background:none!important;box-shadow:none!important;color:var(--neutral-500)!important;font-size:16px!important;font-weight:600!important;line-height:24px!important;white-space:nowrap!important}
  html.bb-header-compact .bb-mode-row > .h6-mode:not(#_) > button.active{background:var(--brand-primary-100,#E3EAFF)!important;color:var(--brand-primary-700)!important}
  html.bb-header-compact .bb-mode-row > .h6-mode:not(#_) > button::after{content:"";position:absolute;inset:-2px 0}
  html.bb-header-compact #main:not(#_){padding-top:8px!important}
  /* 헤더 아래 안내 띠: 모바일에서는 내용이 비어 있어 숨김(개인 기록 보관 안내는 푸터에 있음) */
  html.bb-header-compact #ribbon:not(#_){display:none!important}

  /* 여행 기록(/my) 화면 헤더도 같은 높이로 */
  body > header:has(> #locale):not(#_){height:70px!important;min-height:0!important;padding:0 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;background:#fff!important;border-bottom:1px solid var(--neutral-100)!important;box-sizing:border-box!important}
  body > header:has(> #locale):not(#_) > .brand{margin-right:auto!important;display:flex!important;align-items:center!important;height:28px!important}
  body > header:has(> #locale):not(#_) > .brand img{height:28px!important;width:170px!important;max-width:100%!important;object-fit:contain!important;object-position:left center!important;display:block!important}
  body > header:has(> #locale):not(#_) > #locale{height:32px!important;min-height:0!important;padding:0 8px!important;border-radius:14px!important;font-size:16px!important}
  body > header:has(> #locale):not(#_) > #auth:not(:empty){height:32px!important;padding:6px 12px!important;border-radius:14px!important;font-size:13px!important;font-weight:500!important;display:inline-flex!important;align-items:center!important;white-space:nowrap!important}
}
/* PC 헤더의 모드 전환도 같은 모양(조금 작게): 높이 36 · 14px 굵게 · 모서리 10 */
@media (min-width:768px){
  #header:not(#_) .h6-mode{padding:0!important;gap:4px!important;border:0!important;background:none!important;box-shadow:none!important}
  #header:not(#_) .h6-mode > button{height:36px!important;min-height:0!important;padding:6px 12px!important;border:0!important;border-radius:10px!important;background:none!important;box-shadow:none!important;color:var(--neutral-500)!important;font-size:14px!important;font-weight:600!important;line-height:24px!important;white-space:nowrap!important}
  #header:not(#_) .h6-mode > button.active{background:var(--brand-primary-100,#E3EAFF)!important;color:var(--brand-primary-700)!important}
}
/* PC 상단 메뉴: 지금 보고 있는 화면을 색으로 표시(파란 글자 · 굵게 · 아래 2px 줄). 앱이 붙이는 aria-current="page" 기준 */
#header:not(#_) .h6-desktop-nav > button{position:relative}
#header:not(#_) .h6-desktop-nav > button[aria-current="page"],#header:not(#_) .h6-desktop-nav > button.active{color:var(--brand-primary-600)!important;font-weight:700!important}
#header:not(#_) .h6-desktop-nav > button[aria-current="page"]::after,#header:not(#_) .h6-desktop-nav > button.active::after{content:""!important;display:block!important;position:absolute!important;left:0!important;right:0!important;top:auto!important;bottom:-8px!important;width:auto!important;height:2px!important;border-radius:2px!important;background:var(--brand-primary-600)!important;transform:none!important;opacity:1!important}
@media (hover:hover){#header:not(#_) .h6-desktop-nav > button:hover{color:var(--color-text-primary)!important}#header:not(#_) .h6-desktop-nav > button[aria-current="page"]:hover{color:var(--brand-primary-600)!important}}
