@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nav-h: 52px;
  --tab-h: 58px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #ECEAE4;
  color: #1A1A18;
  font-size: 13px;
  -webkit-tap-highlight-color: transparent;
}

/* ══ TOP NAV ══ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #1A1A18;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-brand {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.2px;
  margin-right: auto;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #888880;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: #d0cec8; }
.nav-link.active { background: rgba(255,255,255,0.13); color: #fff; }

/* ══ BOTTOM TAB BAR ══ */
.site-tabs {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1A1A18;
  border-top: 1px solid #2A2A28;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site-tabs-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--tab-h);
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #555550;
  padding: 6px 4px;
}
.tab-item.active { color: #fff; }
.tab-icon { font-size: 18px; line-height: 1; }
.tab-label { font-size: 9.5px; font-weight: 600; }

/* ══ PAGE WRAPPER ══ */
.page-wrap {
  padding-top: var(--nav-h);
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .site-tabs { display: block; }
  .page-wrap {
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  }
}

@media print {
  .site-nav,
  .site-tabs { display: none !important; }
  .page-wrap { padding: 0 !important; }
}
