/* 코이노비아 탭 ─ 네 곳(홈·공방·앱·소식)이 같이 쓰는 위쪽 메뉴 글자와 아래쪽 탭 막대(tabs.js가 그려요) */

/* 떠 있는 유리 면(위 메뉴 띠·아래 탭 막대·작은 배지)이 같이 쓰는 값: 바탕을 흐리게 비추고, 가장자리에 가는 빛.
   유리는 이렇게 떠 있는 것에만 써요. 본문·카드·글꼴은 종이 같은 납작한 모양 그대로 */
:root { --glass-bg: color-mix(in srgb, var(--page) 62%, transparent); --glass-edge: rgba(255, 255, 255, .75); --glass-line: rgba(20, 20, 18, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-edge: rgba(255, 255, 255, .12); --glass-line: rgba(255, 255, 255, .07); } }
:root[data-theme="dark"] { --glass-edge: rgba(255, 255, 255, .12); --glass-line: rgba(255, 255, 255, .07); }

/* 작은 로고(머리글·바닥글): 2026-12-05부터 다시 먹 한 가지. 색은 글자색(currentColor)을 따라요 */

/* PC: 위쪽 띠의 메뉴 글자 */
.toplinks { display: none; gap: 4px; }
.toplink { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: inherit; font-weight: 400; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.toplink:hover { color: var(--link); }
/* 지금 탭: 글자 아래 가는 붉은 흙색 선 */
.toplink[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px; background: var(--link); }

/* 홈: 첫 화면 그림 위에 투명하게 떠 있다가, 내려가면 미색 유리로 바뀌어요(tabs.js가 .solid를 달아요) */
.nav.over { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: rgba(244, 239, 228, .18); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #F4EFE4; transition: background .3s, color .3s, border-color .3s; }
.nav.over .brand { color: inherit; }
.nav.over .toplink[aria-current="page"]::after { background: #E7B49B; }
.nav.over .toplink:hover { color: #E7B49B; }
.nav.over.solid { background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7); border-bottom-color: var(--glass-line); color: var(--ink); box-shadow: inset 0 -1px 0 var(--glass-edge), 0 8px 24px -20px var(--shadow); }
.nav.over.solid .toplink[aria-current="page"]::after { background: var(--link); }
.nav.over.solid .toplink:hover { color: var(--link); }

/* 휴대폰: 화면 아래 탭 막대 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7); border-top: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge), 0 -8px 24px -20px var(--shadow); padding: 0 env(safe-area-inset-right, 0px) max(6px, env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; color: var(--ink-2); text-decoration: none; font-size: .74rem; font-weight: 500; -webkit-tap-highlight-color: transparent; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--link); font-weight: 600; }
.tabbar a[aria-current="page"] svg { stroke-width: 1.9; }
/* 새 탭에 다는 작은 '새' 배지 */
.new-dot { margin-left: 6px; font-size: .68rem; font-weight: 700; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 7px; line-height: 1.6; }
.tabbar .new-dot { position: absolute; top: 5px; right: calc(50% - 26px); margin: 0; font-size: .6rem; padding: 0 5px; }
/* 탭 막대가 글을 가리지 않게 아래 여백을 둬요 */
body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 900px) {
  .toplinks { display: flex; }
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}
