/*
 * subuki site CSS — 공용 chrome (header/footer/bottom-nav/top-bubble) + skip link.
 * 정적 자산. immutable cache (max-age=31536000) — 변경 시 ?v= query 또는 파일명 변경.
 */

:root {
  color-scheme: light;
  --ink: #1f2937;
  --ink-muted: #6b7280;
  --ink-faint: #9ca3af;
  --line: #f3f4f6;
  --line-strong: #e5e7eb;
  --bg: #fff;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard Variable', Pretendard, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + var(--safe-bottom));
}
@media (min-width: 960px) { body { padding-bottom: 0; } }

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 0.6rem 1rem;
  background: #1f2937;
  color: #fff;
  z-index: 100;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-nav .brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}
.site-nav-links { display: none; gap: 1rem; font-size: 0.875rem; }
.site-nav-links a { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.site-nav-links a:hover { color: var(--ink); }
@media (min-width: 768px) { .site-nav-links { display: flex; } }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
@media (min-width: 768px) { main { padding: 2rem 1rem; } }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 0.4rem 0 calc(0.4rem + var(--safe-bottom));
  z-index: 40;
}
@media (min-width: 960px) { .bottom-nav { display: none; } }
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.4rem 0.6rem;
  min-width: 60px;
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.15s;
}
.bottom-nav-item.active { color: var(--ink); }
.bottom-nav-item.active svg { stroke: var(--accent); }

.top-bubble {
  position: fixed;
  right: 1rem;
  bottom: calc(80px + var(--safe-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.top-bubble.visible { opacity: 1; transform: translateY(0); }
@media (min-width: 960px) { .top-bubble { bottom: 1.5rem; right: 1.5rem; } }

footer.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; }
footer.site-footer div {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
