/* Fixed bottom nav strip — shared across vault pages */
body.has-nav-strip {
  padding-bottom: 96px;
}

#navstrip {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9200;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(251, 247, 239, 0.98);
  border: 1.5px solid #232421;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 4px 18px rgba(55, 45, 30, 0.22);
  backdrop-filter: blur(10px);
  max-width: calc(100vw - 20px);
}

.ns-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bdb3a0;
  font-style: italic;
  font-family: "Lora", serif;
  padding-right: 2px;
  flex-shrink: 0;
}

.ns-sep {
  width: 1px;
  height: 18px;
  background: #ded4c1;
  margin: 0 3px;
  flex-shrink: 0;
}

.ns-btn {
  font-size: 11px;
  font-family: "Lora", serif;
  font-style: italic;
  color: #4a453c;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ns-btn:hover {
  background: rgba(47, 83, 103, 0.09);
  color: #2f5367;
}

.ns-btn.ns-active {
  background: #2f5367;
  color: #fffaf0;
  font-weight: 600;
}

.ns-btn.ns-active:hover {
  background: #1e3a4a;
}

.ns-btn.ns-external {
  color: #a5643a;
  font-weight: 600;
}

.ns-btn.ns-external:hover {
  background: rgba(165, 100, 58, 0.1);
  color: #7d4a28;
}

.ns-btn.ns-menu-trigger {
  font-weight: 600;
  color: #2f5367;
}

.ns-btn.ns-menu-trigger.open {
  background: rgba(47, 83, 103, 0.12);
}

.ns-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.ns-search {
  width: 118px;
  border: 1px solid #c9baa4;
  border-radius: 4px;
  padding: 5px 8px;
  font-family: "Lora", serif;
  font-size: 11px;
  font-style: italic;
  background: rgba(255, 253, 248, 0.95);
  color: #232421;
  outline: none;
  transition: width 0.2s, border-color 0.2s;
}

.ns-search:focus {
  width: 160px;
  border-color: #2f5367;
}

.ns-search-results {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  max-width: 320px;
  max-height: 240px;
  overflow-y: auto;
  background: #fffdf8;
  border: 1.5px solid #232421;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(55, 45, 30, 0.18);
  padding: 4px;
  z-index: 9300;
}

.ns-search-results.open {
  display: block;
}

.ns-search-results a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: #232421;
  font-family: "Lora", serif;
  font-size: 11px;
  font-style: italic;
}

.ns-search-results a:hover {
  background: rgba(47, 83, 103, 0.08);
}

.ns-search-results .sr-title {
  font-weight: 600;
  font-style: normal;
  font-family: "Playfair Display", serif;
  font-size: 12px;
}

.ns-search-results .sr-hint {
  font-size: 10px;
  color: #8a8274;
  margin-top: 2px;
}

.ns-search-empty {
  padding: 10px;
  font-size: 11px;
  font-style: italic;
  color: #8a8274;
}

.ns-dropdown {
  position: relative;
  flex-shrink: 0;
}

.ns-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  background: #fffdf8;
  border: 1.5px solid #232421;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(55, 45, 30, 0.18);
  padding: 4px;
  z-index: 9300;
}

.ns-popover.open {
  display: block;
}

.ns-popover a {
  display: block;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  color: #4a453c;
  font-family: "Lora", serif;
  font-size: 11px;
  font-style: italic;
  white-space: nowrap;
}

.ns-popover a:hover {
  background: rgba(47, 83, 103, 0.09);
  color: #2f5367;
}

.ns-gear-wrap {
  position: relative;
  flex-shrink: 0;
}

.ns-gear {
  width: 28px;
  height: 28px;
  border: 1px solid #c9baa4;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.9);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: #8a8274;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ns-gear:hover {
  border-color: #2f5367;
  color: #2f5367;
}

.ns-config-panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 240px;
  max-height: 280px;
  overflow-y: auto;
  background: #fffdf8;
  border: 1.5px solid #232421;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(55, 45, 30, 0.18);
  padding: 10px;
  z-index: 9300;
}

.ns-config-panel.open {
  display: block;
}

.ns-config-panel h4 {
  font-family: "Playfair Display", serif;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #232421;
}

.ns-config-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 11px;
  font-style: italic;
  color: #4a453c;
  cursor: pointer;
}

.ns-config-panel input {
  accent-color: #2f5367;
}

.ns-hidden-nav {
  display: none !important;
}

@media (max-width: 900px) {
  #navstrip {
    left: 10px;
    right: 10px;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
  }

  .ns-search {
    width: 100px;
  }

  .ns-search:focus {
    width: 130px;
  }
}
