/* 하단 메뉴만 적용: 여행 카드와 본문 디자인은 변경하지 않는다. */
:root { --nav-safe: env(safe-area-inset-bottom, 0px); --nav-height: calc(78px + var(--nav-safe)); --nav-keyboard: 0px; --nav-bg: var(--surface, #fff); --nav-ink: var(--muted, #6a6a6a); --nav-accent: var(--accent, #0369a1) }
/* 2026-12-01 베어스타: "하단 공백이 왜있어 · 최대한 내려줘" — Capacitor 8 은 기본으로 edge-to-edge 라
   env(safe-area-inset-bottom) 가 이제 실제 제스처 바 높이를 돌려주는데, --app-bottom(2.6rem 고정값,
   "WebView 에서 0 으로 오는 일이 많다" 던 옛 가정)을 **더해서** 같은 하단 여백을 두 번 세고 있었다 —
   실기기에서 탭 라벨 아래로 빈 띠가 남는 원인. + 대신 max() 로 "둘 중 더 큰 쪽 하나만" 쓴다 —
   env 이 0 이면(옛 WebView) --app-bottom 그대로 지켜지고, env 이 실제 값이면 그만큼만 쓰고 더하지 않는다. */
html.is-app { --nav-height: calc(78px + max(var(--app-bottom, 2.6rem), var(--nav-safe))) }
body.has-bottom-nav > .wrap { padding-bottom: calc(var(--nav-space, var(--nav-height)) + 16px) }
body.has-bottom-nav .pagehd.hometabs,
body.has-bottom-nav .tc-bottom-nav {
  position: fixed; inset: auto 0 var(--nav-keyboard); z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 0;
  width: 100%; max-width: var(--wrap, 48rem); height: var(--nav-height);
  box-sizing: border-box; margin: 0 auto; padding: 5px 6px calc(5px + var(--nav-safe));
  background: var(--nav-bg); color: var(--nav-ink); border: 0; border-top: 1px solid var(--line, #ebebeb);
  border-radius: 0; box-shadow: none; font-family: var(--b, system-ui, sans-serif);
  /* 삼성 인터넷 등 일부 모바일 브라우저는 주소창이 숨었다 나타났다 할 때 position:fixed
     요소를 다시 그리며 한 프레임 어긋나게 그린다(2026-12-01 베어스타: "메인은 고쳤는데 일정
     화면은 여전히 흔들려" — 스크린샷이 삼성 인터넷). 레이어를 따로 떼어(GPU 합성) 문서
     리플로우와 분리해 두면 흔들림 없이 그대로 떠 있는다 — 흔한 모바일 브라우저 우회법. */
  transform: translateZ(0); -webkit-transform: translateZ(0); will-change: transform; backface-visibility: hidden;
}
html.is-app body.has-bottom-nav .tc-bottom-nav,
html.is-app body.has-bottom-nav .pagehd.hometabs { padding-bottom: calc(5px + max(var(--app-bottom, 2.6rem), var(--nav-safe))) }
body.has-bottom-nav .tc-bottom-nav > .tc-nav-item,
body.has-bottom-nav .hometabs > .htab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: auto; min-width: 0; min-height: 44px; margin: 0; padding: 2px 0;
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
  color: var(--nav-ink); text-decoration: none; cursor: pointer; font: inherit; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
body.has-bottom-nav .hometabs > .htab .h2,
body.has-bottom-nav .tc-nav-label { margin: 0; font: 500 10px/1.35 var(--b, system-ui, sans-serif); letter-spacing: -.25px; white-space: nowrap; color: inherit }
body.has-bottom-nav .hometabs > .htab .cnt { display: none }
body.has-bottom-nav .hometabs > .htab .ico,
body.has-bottom-nav .tc-nav-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 0; flex: none }
body.has-bottom-nav .tc-nav-icon svg,
body.has-bottom-nav .hometabs .ico svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
body.has-bottom-nav :is(.hometabs, .tc-bottom-nav) > :is(.on, [open]):not(.tc-nav-chat),
body.has-bottom-nav :is(.hometabs, .tc-bottom-nav) > :is(.on, [open]):not(.tc-nav-chat) :is(.h2, .tc-nav-label) { color: var(--nav-accent); background: transparent; border: 0; font-weight: 700 }
/* Airbnb의 투명 탭 + 밑줄 원칙. 색 외에 획 굵기로도 현재 위치를 구분한다. */
body.has-bottom-nav :is(.hometabs, .tc-bottom-nav) > :is(.on, [open]):not(.tc-nav-chat) svg { stroke-width: 2.4 }
body.has-bottom-nav :is(.hometabs, .tc-bottom-nav) > :is(.on, [open]):not(.tc-nav-chat)::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 24px; height: 3px;
  transform: translateX(-50%); border-radius: 2px; background: var(--nav-accent); pointer-events: none;
}
body.has-bottom-nav .hometabs > .tc-nav-chat .ico,
body.has-bottom-nav .tc-nav-chat .tc-nav-icon { background: var(--nav-accent); color: var(--accent-fg, #fff); border-radius: 50%; box-shadow: 0 3px 8px #0369a126 }
body.has-bottom-nav .tc-nav-chat .tc-nav-label,
body.has-bottom-nav .hometabs > .tc-nav-chat .h2 { color: var(--nav-accent); font-weight: 700 }
body.has-bottom-nav .tc-bottom-nav > #chatFab { position: static; inset: auto; display: flex; width: auto; height: auto; transform: none; border: 0; background: transparent; box-shadow: none; border-radius: 0; padding: 2px 0 }
body.has-bottom-nav .tc-bottom-nav > #chatFab:hover { filter: none }
body.has-bottom-nav .tc-nav-item:focus-visible,
body.has-bottom-nav .hometabs > .htab:focus-visible { outline: 2px solid var(--nav-accent); outline-offset: -3px; border-radius: 8px }
/* 안전영역은 아래 메뉴가 이미 확보한다. 시트에서 다시 더하면 입력창 아래가 빈다. */
body.has-bottom-nav .sheet .chatbar { margin-bottom: 0 }
html body.has-bottom-nav .sheet { padding-bottom: .6rem; bottom: calc(var(--nav-space, var(--nav-height)) + var(--nav-keyboard)); max-height: calc(100dvh - var(--nav-space, var(--nav-height)) - var(--nav-keyboard) - 12px) }
@media (min-width: 64rem) {
  body.has-bottom-nav.dock .sheet { bottom: var(--nav-space, var(--nav-height)); height: calc(100dvh - var(--nav-space, var(--nav-height))) !important; max-height: none }
}
body.has-bottom-nav :is(.hometabs, .tc-bottom-nav) .moremenu > .morepanel { bottom: calc(var(--nav-space, var(--nav-height)) + var(--nav-keyboard)); max-height: calc(100dvh - var(--nav-space, var(--nav-height)) - var(--nav-keyboard) - 12px) }
.tc-chat-picker { width: min(360px, calc(100vw - 32px)); max-height: 70dvh; box-sizing: border-box; border: 1px solid var(--line, #ddd); border-radius: 18px; padding: 20px; background: var(--nav-bg); color: var(--fg, #222); font-family: var(--b, system-ui, sans-serif) }
.tc-chat-picker::backdrop { background: #0005 }
.tc-chat-picker h2 { font-size: 18px; margin: 0 0 16px }
.tc-chat-picker p { font-size: 14px }
.tc-chat-picker a, .tc-chat-picker button { display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: 12px; margin-top: 6px; color: inherit; text-decoration: none; font: inherit; text-align: left; background: transparent; border: 1px solid var(--line, #ddd); border-radius: 10px }
.tc-chat-picker a:hover { background: var(--sunken, #f7f7f7) }
.tc-chat-picker .tc-picker-close { text-align: center; color: var(--nav-accent) }
.tc-chat-picker .tc-picker-new { color: var(--nav-accent); font-weight: 700; border-style: dashed }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --nav-bg: var(--surface, #13223a); --nav-ink: var(--muted, #9fb3c8) } }
